public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected]
Subject: Re: What happens if the socket lock file is deleted?
Date: Thu, 29 Jan 2026 16:14:28 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[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]






view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: What happens if the socket lock file is deleted?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox