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 1gtzwX-0006dM-1A for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Feb 2019 19:11:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gtzwV-0000EN-PT for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Feb 2019 19:11:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtzwV-0000EG-IX for pgsql-hackers@lists.postgresql.org; Wed, 13 Feb 2019 19:11:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtzwT-0002Md-85 for pgsql-hackers@lists.postgresql.org; Wed, 13 Feb 2019 19:11:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x1DJBQuB001467; Wed, 13 Feb 2019 14:11:26 -0500 From: Tom Lane To: Andres Freund cc: Thomas Munro , PostgreSQL Hackers Subject: Re: subscriptionCheck failures on nightjar In-reply-to: <20190213183303.ns54frt7cmvo6pgg@alap3.anarazel.de> References: <17827.1549866683@sss.pgh.pa.us> <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> Comments: In-reply-to Andres Freund message dated "Wed, 13 Feb 2019 10:33:03 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1465.1550085086.1@sss.pgh.pa.us> Date: Wed, 13 Feb 2019 14:11:26 -0500 Message-ID: <1466.1550085086@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. regards, tom lane