execGrouping.c limit on work_mem

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: execGrouping.c limit on work_mem
Date: 2017-05-28 02:34:27
Message-ID: CAMkU=1yRMzPkxhEd2EOdPakSFC2ryvEy=-akCE53nY+JezHb1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In BuildTupleHashTable

/* Limit initial table size request to not more than work_mem */
nbuckets = Min(nbuckets, (long) ((work_mem * 1024L) / entrysize));

Is this a good idea? If the caller of this code has no respect for
work_mem, they are still going to blow it out of the water. Now we will
just do a bunch of hash-table splitting in the process. That is only going
to add to the pain.

Also:

* false if it existed already. ->additional_data in the new entry has

The field is just ->additional, not ->additional_data

Cheers,

Jeff

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-05-28 04:30:47 Re: logical replication and PANIC during shutdown checkpoint in publisher
Previous Message Jeff Janes 2017-05-28 01:50:34 simplehash.h typo