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 1mCYUZ-0001GU-Fa for pgsql-committers@arkaria.postgresql.org; Sun, 08 Aug 2021 02:24:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mCYUY-00075z-EZ for pgsql-committers@arkaria.postgresql.org; Sun, 08 Aug 2021 02:24:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCYUX-00075q-09 for pgsql-committers@lists.postgresql.org; Sun, 08 Aug 2021 02:24:46 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCYUT-0005eH-Ov for pgsql-committers@lists.postgresql.org; Sun, 08 Aug 2021 02:24:44 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 6A39D3200901; Sat, 7 Aug 2021 22:24:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 07 Aug 2021 22:24:38 -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=KZO/kSbWHpH/I8+cLtGgghiItFT PBi0nm0/REo1cSTk=; b=rTq+40I89YV5aIX2mB2r8ItgY12F675dIbWSq0uI4c7 RQTNSZEWA636YWKlkU/t7ISysUV7Ljn2pRhNiAWCmoYTngz/8mpkkXbfdcc2BK6K T90ADTK4tj8sZjElxsVsDbv6nH/EzT9gBgHWczcWml8T42dC+3t94odNIq2K7a5c OZv89TTzSU9alxNr+P9+QK4eVmAi/X3a3yE9r2Oz9jaUjEMjOzvlPBACJuOtXSDc uSn3eb5+Vi9J0Mbxi3Lc2IRLAyuBm70FbEN66CzywY2HyD6m5EIluSVfMh3JOHEy FEYep4/BQJLXiqZF+lnU6N1bX5HsBrDT+iJZ9jGJQfA== 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=KZO/kS bWHpH/I8+cLtGgghiItFTPBi0nm0/REo1cSTk=; b=BAJxyCQhLD47Oh6uWXv4zw r7YAHiahowwnH6ECvck4J1SGouSQCPIx80CXJITa2uI16hZ10OA+KdqSbq5Zwo9M oQQ5XO6vgGkgJCw7zvV/GWam99aM7PvVMHuM+iGQb4QiB0hurc630WTHzuzAgRWL 0tlVI8YuRB66AZ0+ie+Vcby/zRvNa7eWoyRCJ2zIrauJPLu5bVqQbQllinioVxIt 1uyHzOXye7byg2gc/UJwV62J6K5X4NmNrVyyVP+hX/Otps1JbJeI5wjB7f67xOVZ W7piW0ZxmazJ3yqLExA+NJz2ZxToyyXkExifHSwtqs+jzEXfq3b2q4SnIiAIKvkQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeeggdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttdertd dttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgr rhgriigvlhdruggvqeenucggtffrrghtthgvrhhnpedukefhkeelueegveetheelffffje egleeuudelfeefuedtleffueejfffhueffudenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 22:24:37 -0400 (EDT) Date: Sat, 7 Aug 2021 19:24:35 -0700 From: Andres Freund To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o Message-ID: <20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de> References: <2638683.1628304247@sss.pgh.pa.us> <20210807030652.qf5wsbhxk7dpsmtn@alap3.anarazel.de> <2640064.1628306008@sss.pgh.pa.us> <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> <20210807190131.2bm24acbebl4wl6i@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210807190131.2bm24acbebl4wl6i@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2021-08-07 12:01:31 -0700, Andres Freund wrote: > Attached is a patch showing how this could look like. Note that the PANIC > should likely not be that but a WARNING, but the PANIC more useful for running > some initial tests... I pushed a slightly evolved version of this. As the commit message noted, this may not be the best approach, but we can revise after further discussion. > I'm not sure whether we'd want to continue having the proc exit hook? It seems > to me that asserts would provide a decent enough protection against > introducing new temp files during shutdown. > Alternatively we could make the asserts in OpenTemporaryFile et al > elog(ERROR)s, and be pretty certain that no temp files would be open too late? I ended up removing the proc exit hook and not converting the asserts to an elog(). Happy to change either. Greetings, Andres Freund