Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gu2Rg-0003Wk-U7 for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Feb 2019 21:51:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gu2Rf-0004Px-CW for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Feb 2019 21:51:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gu2Rd-0004Pq-Vc for pgsql-hackers@lists.postgresql.org; Wed, 13 Feb 2019 21:51:54 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gu2Ra-0002jM-VI for pgsql-hackers@lists.postgresql.org; Wed, 13 Feb 2019 21:51:52 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id B344463D1; Wed, 13 Feb 2019 16:51:49 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 13 Feb 2019 16:51:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=C1jMOnxj0xpYE5n6NJs0O9da84V wITMn9mvh6EH7Hwc=; b=c40lrKDADy5wUAj2Ycgbtg4HirX4bu6OubPZWyONxIQ Mgmb+DoJcffu3NmuKFYFidK7suyClT2qWCzEee/juh6zEDE0Q9MrGJNfRVBXUvVC mKjsTHsa8oveBqAxJATCESbbjtTb9lwGAcdZ/tlTkmTAd7wOuX7ew2ZGle4ZU99y SEe8AipaYVgdbLfc5ycMgndEwWW2Egqfz9AsP/y0iLWSPxlMABGyMpvWEU4xDqff McIbfiQmpWMc4kRRjlL6be4vQ3VC9aW/TSvh1SsQPqcCPZOJJtOpjir8oQIvP+Y6 mLZGz1rmDpw0GxiBr3gc1nWLZMtP44bmrMz/EtvNZig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=C1jMOn xj0xpYE5n6NJs0O9da84VwITMn9mvh6EH7Hwc=; b=yIMtilCA6g99MnhkwvvWqX 7owqkSUopS1z8XlWR21ntv9iRFXGd3ojNQlwjBvfjapTt/slJFpdyXy7W+D8VqDC 7smxA1Fl9nB0QlEhvZMdDYEz+oOMBDjKJfxpqs5GAJyPQ29A0QhEqOGYD/ZFGpMe EJpouEPaSbegN5EPLSgpCUWzJymTecIzTfXYSQ24pVqV426NAxt68qy9Kmx9yApr frNXWXY8HxjHW0JDvISoKmLCIxb+C9FcAwq2XrWUj25lsBJfnGMGXkQNIIoU+OUZ 8dH0+1URUr9oykdSo1kM9Satqc/mxSQV1ob77XSvpXa7KGlTpWZbc502gDfkEs4g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddtfedgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu fedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukf hfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceo rghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkphepkeejrdduledurdehuddrke dvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdgu vgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (unknown [87.191.51.82]) by mail.messagingengine.com (Postfix) with ESMTPA id EBFCA10312; Wed, 13 Feb 2019 16:51:48 -0500 (EST) Date: Wed, 13 Feb 2019 13:51:47 -0800 From: Andres Freund To: Thomas Munro Cc: Tom Lane , PostgreSQL Hackers Subject: Re: subscriptionCheck failures on nightjar Message-ID: <20190213215147.cjbymfojf6xndr4t@alap3.anarazel.de> References: <27965.1550077052@sss.pgh.pa.us> <20190213171101.6wpz7tardp3t3uvk@alap3.anarazel.de> <29708.1550079455@sss.pgh.pa.us> <20190213174151.mfylkessxmapt4io@alap3.anarazel.de> <30608.1550080759@sss.pgh.pa.us> <20190213181225.fathyapig4sm4exa@alap3.anarazel.de> <31663.1550082243@sss.pgh.pa.us> <20190213183303.ns54frt7cmvo6pgg@alap3.anarazel.de> <1466.1550085086@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-02-14 09:52:33 +1300, Thomas Munro wrote: > On Thu, Feb 14, 2019 at 8:11 AM Tom Lane wrote: > > Andres Freund writes: > > > I was kinda pondering just open coding it. I am not yet convinced that > > > my idea of just using an open FD isn't the least bad approach for the > > > issue at hand. What precisely is the NFS issue you're concerned about? > > > > I'm not sure that fsync-on-FD after the rename will work, considering that > > the issue here is that somebody might've unlinked the file altogether > > before we get to doing the fsync. I don't have a hard time believing that > > that might result in a failure report on NFS or similar. Yeah, it's > > hypothetical, but the argument that we need a repeat fsync at all seems > > equally hypothetical. > > > > > Right now fsync_fname_ext isn't exposed outside fd.c... > > > > Mmm. That makes it easier to consider changing its API. > > Just to make sure I understand: it's OK for the file not to be there > when we try to fsync it by name, because a concurrent checkpoint can > remove it, having determined that we don't need it anymore? In other > words, we really needed either missing_ok=true semantics, or to use > the fd we already had instead of the name? I'm not yet sure that that's actually something that's supposed to happen, I got to spend some time analysing how this actually happens. Normally the contents of the slot should actually prevent it from being removed (as they're newer than ReplicationSlotsComputeLogicalRestartLSN()). I kind of wonder if that's a bug in the drop logic in newer releases. Greetings, Andres Freund