Re: work_mem

Поиск
Список
Период
Сортировка
От SASIKUMAR Devaraj
Тема Re: work_mem
Дата
Msg-id 1654783699.2333997.1617367552583@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: work_mem  (MichaelDBA <MichaelDBA@sqlexec.com>)
Ответы Re: work_mem
Список pgsql-admin
Thanks Michael 

For example work_mem is 4M and if I had 300 connections connected to dB the total memory requirement is 1.2 Gb.
 So as per my understanding this 1.2 gb is not allocated as soon as 300 connections established, but it may vary from 0 to 1.2gb as per operations from client. Please confirm 

Regards

Sasi


On Fri, Apr 2, 2021 at 6:09 PM, MichaelDBA
<MichaelDBA@sqlexec.com> wrote:
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

Regards

Sasi


On Wed, Mar 31, 2021 at 8:52 PM, Holger Jakobs
#yiv8729720470 -- filtered {} #yiv8729720470 filtered {} #yiv8729720470 filtered {} #yiv8729720470 p.yiv8729720470MsoNormal, #yiv8729720470 li.yiv8729720470MsoNormal, #yiv8729720470 div.yiv8729720470MsoNormal {margin:0in;font-size:12.0pt;font-family:sans-serif;} #yiv8729720470 span.yiv8729720470EmailStyle17 {font-family:sans-serif;color:windowtext;} #yiv8729720470 .yiv8729720470MsoChpDefault {font-size:12.0pt;font-family:sans-serif;} #yiv8729720470 filtered {} #yiv8729720470 div.yiv8729720470WordSection1 {} #yiv8729720470
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.


Am 31. März 2021 16:04:07 MESZ schrieb "Campbell, Lance" <lance@illinois.edu>:

PostgreSQL 12

 

Is there a query that will tell us at any given time what amount of PostgreSQL memory is being used for work_mem?  

 

Thanks,

 

LANCE CAMPBELL

 

Web Services

Public Affairs

 

 

/var/folders/wp/1f6l7hw95y718z976kgnl5f9kr5rtc/T/com.microsoft.Outlook/WebArchiveCopyPasteTempFiles/signature_logo.png

 

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 -

В списке pgsql-admin по дате отправления:

Предыдущее
От: MichaelDBA
Дата:
Сообщение: Re: work_mem
Следующее
От: MichaelDBA
Дата:
Сообщение: Re: work_mem