Re: Proposal: "query_work_mem" GUC, to distribute working memory to the query's individual operators

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: James Hunter <james(dot)hunter(dot)pg(at)gmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal: "query_work_mem" GUC, to distribute working memory to the query's individual operators
Date: 2025-02-11 18:00:14
Message-ID: e22b9d56e56d4cecd2cc7e95a9758e09cc187c8f.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2025-02-10 at 19:09 -0800, James Hunter wrote:
> I think it makes sense to split the work into two parts: one part
> that
> improves SQL execution, and a second part that improves the
> optimizer,
> to reflect the improvements to execution.

I like the idea to store the value of work_mem in the
path/plan/executor nodes, and use that at execution time rather than
the GUC directly.

IIUC, that would allow an extension to do what you want, right? A
planner hook could just walk the tree and edit those values for
individual nodes, and the executor would enforce them.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-02-11 18:00:27 Re: pg_stat_statements and "IN" conditions
Previous Message Andres Freund 2025-02-11 17:57:46 Re: postgresql.conf.sample ordering for IO, worker related GUCs