On Wednesday, December 20, 2017 9:59:24 AM PST David G. Johnston wrote:
On Wed, Dec 20, 2017 at 9:44 AM, Uwe <uwe@xxxxxxxxx> wrote:
IIRC work_mem is a PER CONNECTION setting,
The docs for this setting clearly state that a single connection/session can itself use multiple times this values for a single query.
https://www.postgresql.org/docs/10/static/runtime-config-resource.html#RUNTI ME-CONFIG-RESOURCE-MEMORY
So even worse for the OP. No wonder he runs out of memory. Thanks for the correction.
Uwe