You are getting a warning as listed below when running a `gpstate` utility on the cluster.
pivotal@station3:~/workspace/gpdb$ rm /tmp/.s.PGSQL.7002.lock
pivotal@station3:~/workspace/gpdb$ gpstate
20250707:11:52:35:031187 gpstate:station3:pivotal-[INFO]:-Starting gpstate with args:
20250707:11:52:35:031187 gpstate:station3:pivotal-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 7.5.0-dev.21.ga4a94c34c0a build dev'
20250707:11:52:35:031187 gpstate:station3:pivotal-[INFO]:-coordinator Greenplum Version: 'PostgreSQL 12.22 (Greenplum Database 7.5.0-dev.21.ga4a94c34c0a build dev) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit compiled on Jul 7 2025 10:53:54 (with assert checking) Bhuvnesh C.'
20250707:11:52:35:031187 gpstate:station3:pivotal-[INFO]:-Obtaining Segment details from coordinator...
20250707:11:52:35:031187 gpstate:station3:pivotal-[INFO]:-Gathering data from segments...
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:-Greenplum instance status summary
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Coordinator instance = Active
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Coordinator standby = No coordinator standby configured
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total segment instance count from metadata = 3
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Primary Segment Status
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total primary segments = 3
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total primary segment valid (at coordinator) = 3
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total primary segment failures (at coordinator) = 0
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total number of postmaster.pid files missing = 0
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total number of postmaster.pid files found = 3
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total number of postmaster.pid PIDs missing = 0
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total number of postmaster.pid PIDs found = 3
20250707:11:52:36:031187 gpstate:station3:pivotal-[WARNING]:-Total number of /tmp lock files missing = 1 <<<<<<<<
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total number of /tmp lock files found = 2
20250707:11:52:36:031187 gpstate:station3:pivotal-[WARNING]:-Total number postmaster processes missing = 1 <<<<<<<<
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Total number postmaster processes found = 2
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Mirror Segment Status
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:- Mirrors not configured on this array
20250707:11:52:36:031187 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
$ gpstop -ar
20250707:11:53:09:031365 gpstop:station3:pivotal-[INFO]:-Starting gpstop with args: -ar
20250707:11:53:09:031365 gpstop:station3:pivotal-[INFO]:-Gathering information and validating the environment...
20250707:11:53:09:031365 gpstop:station3:pivotal-[INFO]:-Obtaining Greenplum Coordinator catalog information
20250707:11:53:09:031365 gpstop:station3:pivotal-[INFO]:-Obtaining Segment details from coordinator...
20250707:11:53:09:031365 gpstop:station3:pivotal-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 7.5.0-dev.21.ga4a94c34c0a build dev'
20250707:11:53:09:031365 gpstop:station3:pivotal-[INFO]:-Commencing Coordinator instance shutdown with mode='smart'
20250707:11:53:09:031365 gpstop:station3:pivotal-[INFO]:-Coordinator segment instance directory=/home/pivotal/workspace/gpdb/gpAux/gpdemo/datadirs/qddir/gpseg-1
20250707:11:53:09:031365 gpstop:station3:pivotal-[INFO]:-Stopping coordinator segment and waiting for user connections to finish ...
server shutting down
20250707:11:53:10:031365 gpstop:station3:pivotal-[INFO]:-Attempting forceful termination of any leftover coordinator process
20250707:11:53:10:031365 gpstop:station3:pivotal-[INFO]:-Terminating processes for segment /home/pivotal/workspace/gpdb/gpAux/gpdemo/datadirs/qddir/gpseg-1
20250707:11:53:10:031365 gpstop:station3:pivotal-[INFO]:-No standby coordinator host configured
20250707:11:53:10:031365 gpstop:station3:pivotal-[INFO]:-Targeting dbid [2, 3, 4] for shutdown
20250707:11:53:10:031365 gpstop:station3:pivotal-[INFO]:-Commencing parallel segment instance shutdown, please wait...
20250707:11:53:10:031365 gpstop:station3:pivotal-[INFO]:-0.00% of jobs completed
20250707:11:53:13:031365 gpstop:station3:pivotal-[INFO]:-100.00% of jobs completed
20250707:11:53:13:031365 gpstop:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:53:13:031365 gpstop:station3:pivotal-[INFO]:- Segments stopped successfully = 3
20250707:11:53:13:031365 gpstop:station3:pivotal-[INFO]:- Segments with errors during stop = 0
20250707:11:53:13:031365 gpstop:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:53:13:031365 gpstop:station3:pivotal-[INFO]:-Successfully shutdown 3 of 3 segment instances
20250707:11:53:13:031365 gpstop:station3:pivotal-[INFO]:-Database successfully shutdown with no errors reported
20250707:11:53:13:031365 gpstop:station3:pivotal-[INFO]:-Restarting System...
$ gpstate
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-Starting gpstate with args:
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 7.5.0-dev.21.ga4a94c34c0a build dev'
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-coordinator Greenplum Version: 'PostgreSQL 12.22 (Greenplum Database 7.5.0-dev.21.ga4a94c34c0a build dev) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit compiled on Jul 7 2025 10:53:54 (with assert checking) Bhuvnesh C.'
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-Obtaining Segment details from coordinator...
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-Gathering data from segments...
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-Greenplum instance status summary
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Coordinator instance = Active
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Coordinator standby = No coordinator standby configured
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total segment instance count from metadata = 3
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Primary Segment Status
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total primary segments = 3
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total primary segment valid (at coordinator) = 3
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total primary segment failures (at coordinator) = 0
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total number of postmaster.pid files missing = 0
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total number of postmaster.pid files found = 3
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total number of postmaster.pid PIDs missing = 0
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total number of postmaster.pid PIDs found = 3
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total number of /tmp lock files missing = 0
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total number of /tmp lock files found = 3
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total number postmaster processes missing = 0
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Total number postmaster processes found = 3
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Mirror Segment Status
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:- Mirrors not configured on this array
20250707:11:53:57:033902 gpstate:station3:pivotal-[INFO]:-----------------------------------------------------All Greenplum Versions
Postgres Lock files (.s.PGSQL.nnnn.lock) were removed explicitly by admin or automated script by owner of the host(s).
Restart the cluster with `gpstop -ar`
Purpose of these files:
It is for unix domain socket(UDS) communications between client and server. If they never connect with UDS (e.g. go on coordinator host and connect directly with master using psql without using -h flag), then it is not an issue.
E.g.
rm /tmp/.s.PGSQL.7000
psql postgres
psql: error: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.7000"?
For e.g. if your remove the /tmp/.s.7000 or /tmp/.s.7000.lock file as above (for master) it will interfere with ops.
Besides direct client <-> master comms, it is also used internally for master QD -> master entry DB QE process communication. So, for certain query types, not having these files can cause errors.