Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCTU8-0003E0-Hi for pgsql-committers@arkaria.postgresql.org; Sat, 07 Aug 2021 21:04:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mCTU6-0006OH-GR for pgsql-committers@arkaria.postgresql.org; Sat, 07 Aug 2021 21:03:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCTU5-0006O5-35 for pgsql-committers@lists.postgresql.org; Sat, 07 Aug 2021 21:03:58 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCTU2-00026a-EB for pgsql-committers@lists.postgresql.org; Sat, 07 Aug 2021 21:03:56 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 1E7CA3200805; Sat, 7 Aug 2021 17:03:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 07 Aug 2021 17:03:52 -0400 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=fm2; bh=0RjrTo8AlguU6RbI9bm7ZPk94xr +mmM6iS9mqiU5Cww=; b=RXWlYoV/nwoA6LybET4aUq0Qi7il5L1l5Z9Sjy/jqAp HPA6gmR1qdcJyceIuEwEMuZmakTpJpwKt7TlM8AbIXlEKyX0D7O6akO9svdBvSWB XAgsPnaR3Ch69aUgVJLhBN0LLdMAqdST5KUuPyNdiEBB5GFpkSwQuZtA35wQiVLP 5qvCTbNPBhsnaqCzH7BN4hW/KfFU0iIEW1xVEPjR6tavswly2Oo9lZok7qE3wihR oet1EJatfRGa33xa0rPQwMzy6Y9S1omCJJcTdkQWH6S0Wn2Rf2BvelIGM2oSz2Iu l6I/hkYb9e72C8ZFEugdjOE8GnGLi299UodOFVIiqhA== 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=fm3; bh=0RjrTo 8AlguU6RbI9bm7ZPk94xr+mmM6iS9mqiU5Cww=; b=Lbs0hphk4N+xNclyu4tLbD CwfBRa8pOYH50IW8XdSPSCxzayjwHe1oslegsR3GUH0WdV876uz1z880tgMi+A4o KwXB6akyIVaXbAF0cw0mc3pHdjn9SsrmrIR/fBvVShi0I7+Ov+IN23ZQJyXrcbwp jkCIrIwCn70xUneAZ7eYsauIZjuIj9UiJIlYIt+QjyVkczkfh9hXBeYA/jAFWRs8 se5SHpz8DxiANEhaq7XaugklsUmoxJeF9Plk/Hdal+4XqCrqHBgTw2KBI06L3nb1 IqaU/1/NH8ImQBQqRRcQqQEs1HNKCpLJgTwse5jFNEMhwlALcVFAZTkqwcIAx1Og == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdduheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 17:03:50 -0400 (EDT) Date: Sat, 7 Aug 2021 14:03:49 -0700 From: Andres Freund To: Tom Lane , Robert Haas Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o Message-ID: <20210807210349.bby5ta2xrbnte6ht@alap3.anarazel.de> References: <2640490.1628306556@sss.pgh.pa.us> <20210807044952.orwuf7hua2wytx4g@alap3.anarazel.de> <20210807051149.x2j3n64ejcu23hm4@alap3.anarazel.de> <2675112.1628350987@sss.pgh.pa.us> <20210807164850.52atvo2qkmtfnzgt@alap3.anarazel.de> <2771326.1628356007@sss.pgh.pa.us> <20210807172556.rda5m7jjhk7ktukl@alap3.anarazel.de> <2782786.1628357836@sss.pgh.pa.us> <20210807185141.ncmuxchr6d2qv2v6@alap3.anarazel.de> <2788096.1628363558@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2788096.1628363558@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2021-08-07 15:12:38 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2021-08-07 13:37:16 -0400, Tom Lane wrote: > >> Depends what you want to define as a bug. What I am not happy about > >> is the prospect of random assertion failures for the next six months > >> while you finish redesigning half of the system. The rest of us > >> have work we want to get done, too. I don't object to the idea of > >> making no-lost-events an end goal, but we are clearly not ready > >> for that today. > > > I don't know what to do about that. How would we even find these cases if they > > aren't hit during regression tests on my machine (nor on a lot of others)? > > The regression tests really aren't that helpful for testing the problem > scenario here, which basically is SIGTERM'ing a query-in-progress. > I'm rather surprised that the buildfarm managed to exercise that at all. They're also not that helpful because this problem likely is unreachable for any tempfiles other than the one in InitializeBackupManifest(). Pretty much all, or even all, the other tempfiles are cleaned up either via transaction and/or resowner cleanup. I wonder if we should do something about WalSndResourceCleanup() not being reached for FATALs? I think at least a note in WalSndResourceCleanup() commenting on that fact seems like it might be a good idea? It seems like it could eventually be a problem that the resowners added in 0d8c9c1210c4 aren't ever cleaned up in case of a FATAL error. Most resowner cleanup actions are also backstopped with some form of on-exit hook, but I don't think it's all - e.g. buffer pins aren't. I guess I should start a thread about this on -hackers... > You might try setting up a test scaffold that runs the core regression > tests and SIGINT's the postmaster, or alternatively SIGTERM's some > individual session, at random times partway through. Obviously this > will make the regression tests report failure, but what to look for > is if anything dumps core on the way out. Worth trying. Greetings, Andres Freund