Re: external_pid_file not removed on postmaster exit - Mailing list pgsql-hackers

From Amit kapila
Subject Re: external_pid_file not removed on postmaster exit
Date
Msg-id 6C0B27F7206C9E4CA54AE035729E9C382851FB76@szxeml509-mbs
Whole thread Raw
In response to Re: external_pid_file not removed on postmaster exit  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> From: Tom Lane [tgl@sss.pgh.pa.us]
> Sent: Saturday, July 28, 2012 9:46 PM
Amit kapila <amit.kapila@huawei.com> writes:
>>> I think it should be removed with proc_exit hook just like the main
>>> postmaster.pid file.

>> external_pid_file is created first time when it is enabled in postgresql.conf
>> I think it should be removed once the parameter external_pid_file is unset;

> Unset?
By Unset, I mean to say when the configuration parameter 'external_pid_file' is disabled (#external_pid_file).
But if the path/filename is changed to different name across restart of server, it will not be able to delete the
previousfile.  
So it will not workout the way I was trying to think.

However if it is deleted at proc_exit as suggested by Peter, there will be no problem.

The reason why I have thought the file not to get deleted at every proc_exit, is
a. Initially I thought it might be un-necessary to delete and re-create the file at server shutdown and start.
b. I was not sure if this file has usage only till server is running.


With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Adding probes for smgr
Next
From: Pavel Stehule
Date:
Subject: access to psql variables from server again