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 1gtzLP-0004In-AW for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Feb 2019 18:33:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gtzLN-0005hw-UK for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Feb 2019 18:33:13 +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 1gtzLN-0005hp-NL for pgsql-hackers@lists.postgresql.org; Wed, 13 Feb 2019 18:33:13 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtzLH-0001V5-KV for pgsql-hackers@lists.postgresql.org; Wed, 13 Feb 2019 18:33:13 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 51AFB86CA; Wed, 13 Feb 2019 13:33:06 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 13 Feb 2019 13:33:06 -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=6aEUXmyAca9W3pJzZr+AUyJDqYe kxt9MYCyHhPGaiqA=; b=d/i//BYzKtRZbePPMAy3PXZdqmxS9xohcEV7iTCOw2e 6nMl7ZHGaOYeKLg280JucDT04+ZqaPGxr0Sx2fgaWZZY+OybSqhqLOfPVeFcgn6w 1xNb5AmF+VIg7I8VRhSZomAYqaqblJP1TucLIN6BmHVP2FcOtCJoK8rQDPAmmkx4 FWMz9OOgL1SvXW1INnGCAjkTUnEdFYjo4dhzojG1VN3//Wa0JSKC43eRSeOvmCX4 nPvBAAxXPGgxPT3T63r+0YC3sxVCV1WUlRLN3P21KmQ2yChbW5jpE6Fzl4YJikyG ZJkg5GdjY6Bjrxjcfn+aTDdpxqTDf8jlMwwUJkn1saw== 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=6aEUXm yAca9W3pJzZr+AUyJDqYekxt9MYCyHhPGaiqA=; b=weYjmsRBn46rLcWaHV/gWO t5ou1p31e5D5Z11vBv/38JtMTiBLCO9Cyd7zmsANvuoExCumc6fPExYugf/akTvS JbhIWE/jmsZa0DasXaN+WjqC2aT0rqV90lVvnJnb1oNsVKkbR70eHKcGrmK5c4cj Ib/NaZESy6A+RLjPKC7GiQJwxYXdTa2mNhWhqs6gQ1e5Z84g3RPx6PSxlAOsMirr gC7zH+jCoN8O4kQZXqi+yrSXFXdozULNbSoRYf9jJMQJVpDQ39TCR4lewD7fzFZI nmzx7VotkNYt43E0KFd5atFuQr7abjipJAMXLUogXlIOTG4Eh7LmsBJitb1vps1Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddtfedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu fedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukf hfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceo rghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkphepkeekrdduvdekrdekuddrud dvkeenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdr uggvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from intern.anarazel.de (unknown [88.128.81.128]) by mail.messagingengine.com (Postfix) with ESMTPA id ED632E412F; Wed, 13 Feb 2019 13:33:04 -0500 (EST) Date: Wed, 13 Feb 2019 10:33:03 -0800 From: Andres Freund To: Tom Lane Cc: Thomas Munro , PostgreSQL Hackers Subject: Re: subscriptionCheck failures on nightjar Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31663.1550082243@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-02-13 13:24:03 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2019-02-13 12:59:19 -0500, Tom Lane wrote: > >> Perhaps more to the point, the way this was coded, the PANIC applies > >> to open() failures in fsync_fname_ext() not just fsync() failures; > >> that's painting with too broad a brush isn't it? > > > That indeed seems wrong. Thomas? I'm not quite sure how to best fix > > this though - I guess we could rename fsync_fname_ext's eleval parameter > > to fsync_failure_elevel? It's not visible outside fd.c, so that'd not be > > to bad? > > Perhaps fsync_fname() should pass the elevel through as-is, and > then fsync_fname_ext() apply the data_sync_elevel() promotion only > to the fsync() call not the open()? I'm not sure. Yea, that's probably not a bad plan. It'd address your: > The bigger picture here is that there are probably some call sites where > PANIC on open() failure is appropriate too. So having fsync_fname[_ext] > deciding what to do on its own is likely to be inadequate. Seems to me we ought to do this regardless of the bug discussed here. But we'd nee dto be careful that we'd take the "more severe" error between the passed in elevel and data_sync_elevel(). Otherwise we'd end up downgrading errors... > If we fix this by allowing ENOENT to not be an error in this particular > call case, that's going to involve an fsync_fname_ext API change anyway... 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? Right now fsync_fname_ext isn't exposed outside fd.c... Greetings, Andres Freund