Re: [GENERAL] Suddenly - LOG: could not open file "postmaster.pid": No such file or directory - Mailing list pgsql-general

From Daniel Verite
Subject Re: [GENERAL] Suddenly - LOG: could not open file "postmaster.pid": No such file or directory
Date
Msg-id bb0beb35-5a89-4283-aa45-a498b5eac76d@manitou-mail.org
Whole thread Raw
In response to Re: [GENERAL] Suddenly - LOG: could not open file "postmaster.pid":No such file or directory  (Muhammad Hanif Abdul Hamid <hanif.hamid@mimos.my>)
List 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


pgsql-general by date:

Previous
From: Harry Ambrose
Date:
Subject: Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toastvalue 76753264 in pg_toast_10920100
Next
From: PAWAN SHARMA
Date:
Subject: [GENERAL] PostgreSQL Cookbook Testing