Re: Correct the documentation for work_mem - Mailing list pgsql-hackers

From David Rowley
Subject Re: Correct the documentation for work_mem
Date
Msg-id CAApHDvpTRix7P7j2UdwhCEH0cSN7EwJT++Oa6k3UV0QjnwskVg@mail.gmail.com
Whole thread Raw
In response to Re: Correct the documentation for work_mem  ("Imseih (AWS), Sami" <simseih@amazon.com>)
Responses Re: Correct the documentation for work_mem
List pgsql-hackers
On Tue, 25 Apr 2023 at 04:20, Imseih (AWS), Sami <simseih@amazon.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



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.
Next
From: Andres Freund
Date:
Subject: Re: Remove distprep