Increase work_mem to 48MB for postgres.

(cherry picked from commit 195476628154c59762667c1e9c1933510141d37f)