Re: Time to increase hash_mem_multiplier default?

Justin Pryzby <pryzby@telsasoft.com>

From: Justin Pryzby <pryzby@telsasoft.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: John Naylor <john.naylor@enterprisedb.com>, pgsql-hackers@lists.postgresql.org
Date: 2022-02-15T16:17:08Z
Lists: pgsql-hackers
On Mon, Feb 14, 2022 at 10:32:43PM -0800, Peter Geoghegan wrote:
> On Wed, Jan 19, 2022 at 11:32 AM John Naylor
> <john.naylor@enterprisedb.com> wrote:
> > I don't have anything really profound to say here, but in the last
> > year I did on a couple occasions recommend clients to raise
> > hash_mem_multiplier to 2.0 to fix performance problems.
> 
> I would like to push ahead with an increase in the default for
> Postgres 15, to 2.0.
> 
> Any objections to that plan?

The only reason not to is that a single-node hash-aggregate plan will now use
2x work_mem.  Which won't make sense to someone who doesn't deal with
complicated plans (and who doesn't know that work_mem is per-node and can be
used multiplicitively).  I don't see how one could address that other than to
change hash_mem_multiplier to nonhash_mem_divider.

It'll be in the release notes, so should be fine.

-- 
Justin



Commits

  1. Increase hash_mem_multiplier default to 2.0.