Question on memory management sysv/posix on Linux - Mailing list pgsql-general

From Daniel Westermann
Subject Question on memory management sysv/posix on Linux
Date
Msg-id 1137430158.10758.1455704793888.JavaMail.zimbra@dbi-services.com
Whole thread Raw
Responses Re: Question on memory management sysv/posix on Linux  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi

I have a question about memory management in PostgreSQL. I understand the default on Linux usually is "posix" which creates files in /dev/shm. With the default settings of 128MB for shared_buffers this is the result:

ls -la /dev/shm
total 4
drwxrwxrwt  2 root     root       60 Feb 17 11:19 .
drwxr-xr-x 18 root     root     3100 Feb 17 09:36 ..
-rw-------  1 postgres postgres 2316 Feb 17 11:19 PostgreSQL.1804289383

Question: Why is this file only 2316 bytes?


Switching to sysv (same setting for shared_buffers):

ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x0052e2c1 622592     postgres   600        56         5                       
0x6b8b4567 655361     postgres   600        2316       5                       

Again 2316 bytes. Why?

Is the 56 bytes segment related to Robert's post and only used for determining which processes are attached?
http://rhaas.blogspot.com/2012/06/absurd-shared-memory-limits.html



Thanks in advance
Daniel


pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: pgDay Asia / talks / lightning talks
Next
From: Nikhil
Date:
Subject: Re: Custom conflict handlers