Increase work_mem to 48MB for postgres.