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 1mCQGB-0006mm-9M for pgsql-committers@arkaria.postgresql.org; Sat, 07 Aug 2021 17:37:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mCQGA-0001fM-7x for pgsql-committers@arkaria.postgresql.org; Sat, 07 Aug 2021 17:37:22 +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 1mCQGA-0001fE-2A for pgsql-committers@lists.postgresql.org; Sat, 07 Aug 2021 17:37:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCQG8-0001Bg-NX for pgsql-committers@lists.postgresql.org; Sat, 07 Aug 2021 17:37:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 177HbGka2782787; Sat, 7 Aug 2021 13:37:16 -0400 From: Tom Lane To: Andres Freund cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o In-reply-to: <20210807172556.rda5m7jjhk7ktukl@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> <2771326.1628356007@sss.pgh.pa.us> <20210807172556.rda5m7jjhk7ktukl@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 07 Aug 2021 10:25:56 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2782785.1628357836.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 07 Aug 2021 13:37:16 -0400 Message-ID: <2782786.1628357836@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2021-08-07 13:06:47 -0400, Tom Lane wrote: >> Fair. But I suggest that the first cut should look more like what >> I suggest above, ie just be willing to lose events during shutdown. >> The downsides of that are not so enormous that we should be willing >> to undertake major klugery to avoid it before we've even got a >> semi-working system. > I think that's more likely to hide bugs unfortunately. Consider fa91d4c9= 1f2 - > I might not have found that if we had just ignored "too late" pgstats ac= tivity > in pgstats.c or fd.c, and that's not an edge case. 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. regards, tom lane