설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은


총 게시물 73건, 최근 0 건
   

dynamic_shared_memory_type (posix or sysv 차이)

글쓴이 : PostgresDBA 날짜 : 2018-12-27 (목) 12:04 조회 : 5120
[sysv 로 세팅]

[enterprisedb@ssd01:/opt/edb/as10/data]
$ psql
psql.bin (10.6.13)
Type "help" for help.

edb=# show dynamic_shared_memory_type ;
 dynamic_shared_memory_type 
----------------------------
 sysv
(1 row)

edb=# 

[root@ssd01:/dev/shm]
# ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x005311a1 720896     enterprise 600        56         8                       
0x548f5e8b 753665     enterprise 600        6928       8                       
0x408f4840 819203     enterprise 600        168        1                       

[root@ssd01:/dev/shm]

[root@ssd01:/dev/shm]
# ls -l /dev/shm/
total 0
[root@ssd01:/dev/shm]

[posix 로 세팅]

[enterprisedb@ssd01:/opt/edb/as10/data]
$ psql
psql.bin (10.6.13)
Type "help" for help.

edb=# show dynamic_shared_memory_type ;
 dynamic_shared_memory_type 
----------------------------
 posix
(1 row)

edb=# 

[root@ssd01:/dev/shm]
# ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x005311a1 851968     enterprise 600        56         8                       

[root@ssd01:/dev/shm]


[root@ssd01:/dev/shm]
# ls -l
total 12
-rw------- 1 enterprisedb enterprisedb  168 Dec 27 11:59 PostgreSQL.1642690918
-rw------- 1 enterprisedb enterprisedb 6928 Dec 27 11:59 PostgreSQL.303792158
[root@ssd01:/dev/shm]


-------------------
posix 로 할당해도 sysv 메모리를 일부 쓰는 이유는 아래에 나와있습니다.

18.4.1. Shared Memory and Semaphores
....

Upon starting the server, PostgreSQL normally allocates a very small amount of System V shared memory, as well as a much larger amount of POSIX (mmap) shared memory.


   

postgresdba.com