> > especially since the next sentence uses "concurrently" to describe the > > other case. I think we need a more thorough rewording, perhaps like > > > > - 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 or hash > > + operations; each such operation will generally be allowed
> This wording doesn't seem to bring out the fact that there could be > more than one work_mem consumer running (in-progress) at the same > time. Do you mean, more than one work_mem consumer running at the same time for a given query? If so, that is precisely the point we need to convey in the docs. i.e. if I have 2 sorts in a query that can use up to 4MB each, at some point in the query execution, I can have 8MB of memory allocated. Regards, Sami Imseih Amazon Web Services (AWS)