Understanding of the Contents of the two files, postmaster.opts and postmaster.pid in Pivotal Greenplum
search cancel

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

book

Article ID: 295317

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

This article describes the contents of the two files: postmaster.opts and postmaster.pid.

 


Environment


Resolution

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

 

First, let's look at the content of postmaster.pid in the master (the 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' indicates 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 the shared memory.

 

Second, 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 startup.


Additional Information