Re: Suddenly - LOG: could not open file "postmaster.pid": No such file or directory

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Muhammad Hanif Abdul Hamid" <hanif(dot)hamid(at)mimos(dot)my>
Cc: "Michael Paquier" <michael(dot)paquier(at)gmail(dot)com>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Suddenly - LOG: could not open file "postmaster.pid": No such file or directory
Date: 2017-06-23 11:16:19
Message-ID: bb0beb35-5a89-4283-aa45-a498b5eac76d@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Muhammad Hanif Abdul Hamid wrote:

> Maybe an irrelevant question, but I would like to know if there anything
> from postgres process (e.g any parameter that is not set right) that might
> remove the postmaster.pid?

If using Linux, you may put it under watch with

# auditctl -w /path/to/postmaster.pid -k pgpid

If that records too many events, it can be filtered further, for
example this should catch only deletions:

# auditctl -a exit,always -F path=/path/to/postmaster.pid \
-F arch=b64 -S unlink -S unlinkat -k pgpid

Once in effect, the records about which process/user/command
deletes the file and when would be obtained with:

# ausearch -k pgpid

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

In response to

Browse pgsql-general by date

  From Date Subject
Next Message PAWAN SHARMA 2017-06-23 12:27:44 PostgreSQL Cookbook Testing
Previous Message Harry Ambrose 2017-06-23 10:46:33 Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100