Pivotal Knowledge Base

Follow

Current Database log (Master or segments) is missing or deleted from pg_log folder

Problem

  • Pivotal Greenplum(GPDB) database current/present logs are missing from master $MASTER_DATA_DIRECTORY/pg_log or segments $SEG_DATA_DIRECTORY/pg_log directory.
  • The database is running on GPDB DCA server

Cause

This is caused due to dca_log_cleanup daemon running on the DCA , the dca_log_cleanup cleans up the logfiles based on the configuration defined by config file which is found at location 

  • DCA V1: /opt/dca/etc/dca_log_cleanup.conf.
  • DCA V2: /opt/dca/etc/log_cleanup/dca_log_cleanup.conf

Whenever dca_log_cleanup removes the logs it updates "/var/log/messages" with the action it has taken. For eg.s as you can observe on the below messages from the "/var/log/messages" log, dca_log_cleanup has removed the file from the master log directory "/data/master/gpseg-1" at Feb 16 15:21:01.

[root@mdw ~]# cat /var/log/messages | grep dca_log_cleanup
Feb 14 18:57:01 mdw dca_log_cleanup[279967]: Found instance already running at: 3916 Exiting!
Feb 15 00:19:01 mdw dca_log_cleanup[3916]: Deleting file: /home/gpadmin/gpAdminLogs/gpinitstandby_20150929.log
Feb 15 18:57:01 mdw dca_log_cleanup[566786]: Found instance already running at: 3916 Exiting!
Feb 15 19:19:59 mdw dca_log_cleanup[3916]: Deleting file: /home/gpadmin/gpAdminLogs/gpstart_20150929.log
Feb 15 19:19:59 mdw dca_log_cleanup[3916]: Deleting file: /home/gpadmin/gpAdminLogs/gpgetstatususingtransition.py_mdw:gpadmin_20150929.log
Feb 15 19:19:59 mdw dca_log_cleanup[3916]: Deleting file: /home/gpadmin/gpAdminLogs/gpstate_20150929.log
Feb 16 15:21:01 mdw dca_log_cleanup[3916]: Deleting file: /data/master/gpseg-1/pg_log/gpdb-2016-01-19_000000.csv 
[.....]
[.....]

Solution

  • Have a look at the article mentioned here for configuration option related to dca_log_cleanup and also how to modify them.
  • You can also rotate the logfile(as indicated in the article here) , in case you have the logfile missing for the current date/time.

Comments

  • Avatar
    Deepika Pandhi

    For DCA V2 location of dca_log_cleanup.conf file is /opt/dca/etc/log_cleanup/dca_log_cleanup.conf

  • Avatar
    Faisal Ali

    Thanks Deepika .. The article has been updated ...

Powered by Zendesk