Memory is allocated dynamically per internal work_mem buffer requests.
SASIKUMAR Devaraj wrote on 4/2/2021 8:37 AM:
Hi All
As soon as client session is established work_mem will be allocated or only when sort happens for that particular session? Please advise how the internal behavior? This will help me to configure my database memory with high connections
You can show any or all settings with the command SHOW.
show work_mem; show all;
How many times the amount of work_mem has been allocated currently cannot be shown this way. Any sort operation running currently allocates it. So it is not identical with the number of current queries, because queries can allocate it several times.
Under the Illinois Freedom of Information Act any written communication to or from university employees regarding university business is a public record and may be subject to public disclosure.
-- Holger Jakobs, Bergisch Gladbach +49 178 9759012 - sent from mobile, therefore short -