Pivotal Knowledge Base


Understanding of the Contents of the two files, postmaster.opts and postmaster.pid


  • Pivotal Greenplum Database (GPDB) 4.3.x
  • Operating System- Red Hat Enterprise Linux 6.x


This article is to describe the contents of the two files: postmaster.opts and postmaster.pid.


Those two files are located in $MASTER_DATA_DIRECTORY or $SEG_DATA_DIRECTORY.

$ ll postmaster*
-rw------- 1 gpadmin gpadmin 189 Aug 8 23:55 postmaster.opts
-rw------- 1 gpadmin gpadmin 67 Aug 8 23:55 postmaster.pid

Firstly, let's look at the content of postmaster.pid in the master(the segment is similar):

3000001 1232863238

The first line '29709' refers to the master process pid:

$ ps -ef | grep 29709 | grep silent
gpadmin 29709 1 0 Aug08 ? 00:03:49 /data/local/greenplum-db- -D /data/master/gpseg-1 -p 5432 -b 1 -z 24 --silent-mode=true -i -M master -C -1 -x 50 -E

The second line indicates the master data directory. On segment host, it refers to the segment data directory.

The third line '3000001 1232863238' indicated shared memory related information as below:

$ ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x002dc6c1 1232863238 gpadmin 600 213717728 10

Here, 0x002dc6c1 is hexadecimal. If we convert it to decimal it will be 3000001. So we can know that the third line shows the key and the ID of shared memory.

Secondly, let's look at the content of postmaster.opts:

/data/local/greenplum-db- "-D" "/data/master/gpseg-1" "-p" "5432" "-b" "1" "-z" "24" "--silent-mode=true" "-i" "-M" "master" "-C" "-1" "-x" "50" "-E"

It's simpler than postmaster.pid, only showing the command for the node startup.



Powered by Zendesk