Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vlc9m-001OzD-0D for pgsql-general@arkaria.postgresql.org; Fri, 30 Jan 2026 00:14:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vlc9j-00222L-03 for pgsql-general@arkaria.postgresql.org; Fri, 30 Jan 2026 00:14:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vlc9i-00222D-0s for pgsql-general@lists.postgresql.org; Fri, 30 Jan 2026 00:14:35 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vlc9f-000000006KE-3APP for pgsql-general@lists.postgresql.org; Fri, 30 Jan 2026 00:14:34 +0000 Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id 39F731400089; Thu, 29 Jan 2026 19:14:30 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Thu, 29 Jan 2026 19:14:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1769732070; x=1769818470; bh=4QDanvwGApFIs/Wk/wbh9jGkBZlA7EeGnKVOV15LGXE=; b= ilWBzeaMEXFq2ObkTk4NVChLPjZo5yKBMviGBgm6h8jLtjNc4ovrtuGSLp4XnwY4 tjBIaeILFZ0HS/+QfBOnmolOArA3XJaSAogVOwh2cV31gJR9LF3e1Eku0RsAaqxw a+/J7XKx8SfIlqqBRsduSwedX59HV0p3F+fKe/vJDPQAY/kunrzJzxihiuJF8mR+ +7SMFpfvJ+Ksrw2SAsiIVDROhv/XN66P36HkofAzfdsN+5CIGYK5Gp+t2+PzbWxi Gv3TBWZ09f28DfB8p55EpsGMLkQ2ltlycfHXaR7fHDqI0jJ3KtbG36sEo6mHHC7V R1hk8KnPnQjtmYfZvPyeZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1769732070; x= 1769818470; bh=4QDanvwGApFIs/Wk/wbh9jGkBZlA7EeGnKVOV15LGXE=; b=O aTe9Fj1VVkvHdmWqxXTt5kk7r6mj+UBBaiM1/Jm2YPqZ5Jd40WJgufJY2iQwG4V2 wNfcqgUiZgL8gzccaAKBcUmOTUrdaJ877ShJUMOwSBrcpDT901gPf4tMe/f16SIT wNx+dTUhbDB5sR0Bd6rRDzn1pulUvAXa1JdTvGEMQImBzSe3DgqQM6ZSRrPq1z82 OeF2OyCgtIyDauAfbEPTpWwyonr1+2NLvl2/FGr6J0DjswORzcOmMQaT5En+SueW kb3QwUDjOG0ofnmZHiF0vAYQfYeV+/avgrg/UVj4p50eolGvMi3FDRCNAcMhLyJ/ Ehz+diwr6ARbYNLmbeYAg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduieejieduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejre dttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeejuedtgfeihe efueevhfekkeeljeeguddtvedvleegiedvhfduuddvtefhhfelffenucffohhmrghinhep ghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgs pghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepthhglhessh hsshdrphhghhdrphgrrdhushdprhgtphhtthhopehsthgvvhgvjhesshhtvghvvghjrdhn rghmvgdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsth hgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Jan 2026 19:14:29 -0500 (EST) Message-ID: <7c857e55-de24-4b3b-ba7b-7116648119ac@aklaver.com> Date: Thu, 29 Jan 2026 16:14:28 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: What happens if the socket lock file is deleted? To: Tom Lane Cc: "stevej@stevej.name" , pgsql-general@lists.postgresql.org References: <1363739.1769721879@sss.pgh.pa.us> Content-Language: en-US From: Adrian Klaver In-Reply-To: <1363739.1769721879@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/29/26 13:24, Tom Lane wrote: > Adrian Klaver 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 adrian.klaver@aklaver.com