Pivotal Knowledge Base

Follow

Understanding of the contents of the two files: postmaster.opts and postmaster.pid

Environment 

Product Version
Pivotal Greenplum  4.2.x / 4.3.x
OS  All
Others  

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

Procedure

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

$ cd $MASTER_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(segment is similar):

29709
/data/master/gpseg-1
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-4.3.8.2/bin/postgres -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-4.3.8.2/bin/postgres "-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 start up.  

Comments

Powered by Zendesk