public inbox for [email protected]
help / color / mirror / Atom feedRe: What happens if the socket lock file is deleted?
2+ messages / 2 participants
[nested] [flat]
* Re: What happens if the socket lock file is deleted?
@ 2026-01-29 21:24 Tom Lane <[email protected]>
2026-01-30 00:14 ` Re: What happens if the socket lock file is deleted? Adrian Klaver <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Tom Lane @ 2026-01-29 21:24 UTC (permalink / raw)
To: Adrian Klaver <[email protected]>; +Cc: [email protected] <[email protected]>; [email protected]
Adrian Klaver <[email protected]> writes:
> From here at ~line 1781:
> https://github.com/postgres/postgres/blob/master/src/backend/postmaster/postmaster.c
> /*
> * Once a minute, verify that postmaster.pid hasn't been removed or
> * overwritten. If it has, we force a shutdown.
Actually, Steve was asking about socket lock files, so the relevant
code fragment is the bit just below that:
/*
* Touch Unix socket and lock files every 58 minutes, to ensure that
* they are not removed by overzealous /tmp-cleaning tasks. We assume
* no one runs cleaners with cutoff times of less than an hour ...
*/
if (now - last_touch_time >= 58 * SECS_PER_MINUTE)
{
TouchSocketFiles();
TouchSocketLockFiles();
last_touch_time = now;
}
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: What happens if the socket lock file is deleted?
2026-01-29 21:24 Re: What happens if the socket lock file is deleted? Tom Lane <[email protected]>
@ 2026-01-30 00:14 ` Adrian Klaver <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Klaver @ 2026-01-30 00:14 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: [email protected] <[email protected]>; [email protected]
On 1/29/26 13:24, Tom Lane wrote:
> Adrian Klaver <[email protected]> writes:
>> From here at ~line 1781:
>
>> https://github.com/postgres/postgres/blob/master/src/backend/postmaster/postmaster.c
>
>> /*
>> * Once a minute, verify that postmaster.pid hasn't been removed or
>> * overwritten. If it has, we force a shutdown.
>
> Actually, Steve was asking about socket lock files, so the relevant
> code fragment is the bit just below that:
Aah, I was close but no cigar.
Well at least I learned something.
>
> /*
> * Touch Unix socket and lock files every 58 minutes, to ensure that
> * they are not removed by overzealous /tmp-cleaning tasks. We assume
> * no one runs cleaners with cutoff times of less than an hour ...
> */
> if (now - last_touch_time >= 58 * SECS_PER_MINUTE)
> {
> TouchSocketFiles();
> TouchSocketLockFiles();
> last_touch_time = now;
> }
>
> regards, tom lane
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-01-30 00:14 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-01-29 21:24 Re: What happens if the socket lock file is deleted? Tom Lane <[email protected]>
2026-01-30 00:14 ` Adrian Klaver <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox