Re: Correct the documentation for work_mem

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>
Cc: Gurjeet Singh <gurjeet(at)singh(dot)im>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Correct the documentation for work_mem
Date: 2023-07-12 23:11:49
Message-ID: CAApHDvpTRix7P7j2UdwhCEH0cSN7EwJT++Oa6k3UV0QjnwskVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 25 Apr 2023 at 04:20, Imseih (AWS), Sami <simseih(at)amazon(dot)com> wrote:
>
> Based on the feedback, here is a v1 of the suggested doc changes.
>
> I modified Gurjeets suggestion slightly to make it clear that a specific
> query execution could have operations simultaneously using up to
> work_mem.

> - Note that for a complex query, several sort or hash operations might be
> - running in parallel; each operation will generally be allowed
> + Note that a complex query may include several sort and hash operations,
> + and more than one of these operations may be in progress simultaneously
> + for a given query execution; each such operation will generally be allowed
> to use as much memory as this value specifies before it starts
> to write data into temporary files. Also, several running
> sessions could be doing such operations concurrently.

I'm wondering about adding "and more than one of these operations may
be in progress simultaneously". Are you talking about concurrent
sessions running other queries which are using work_mem too? If so,
isn't that already covered by the final sentence in the quoted text
above? if not, what is running simultaneously?

I think Tom's suggestion looks fine. I'd maybe change "sort or hash"
to "sort and hash" per the suggestion from Gurjeet above.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-07-12 23:19:49 Re: Remove distprep
Previous Message Peter Smith 2023-07-12 23:03:27 Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.