public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Adrian Klaver <[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:24:39 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[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






view thread (2+ messages)  latest in thread

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