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 1mECqC-0001TW-7h for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Aug 2021 15:41:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mECqA-0001u9-Lm for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Aug 2021 15:41:54 +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 1mEAEG-0008MY-2F for pgsql-hackers@lists.postgresql.org; Thu, 12 Aug 2021 12:54:36 +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 1mEAE9-0001AG-O3 for pgsql-hackers@postgresql.org; Thu, 12 Aug 2021 12:54:35 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E9FEA3200904; Thu, 12 Aug 2021 08:54:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 12 Aug 2021 08:54:27 -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=aP/VcNDHALhU6Xta1QvVXnuuxxl +BLBWpfA2WKGKmtY=; b=PZVjFTf/ZBGGc18cxlAFIDUnTTj5VyFGQ0Dr3yXu238 4I0z4d+XJcXRmtznVoQRo+9vj/WEFiysGScQRsf4eJggFuQ0sHZJ91muyCttgd/I xzD/twxrIe7664zlIB/5vmdpgPRn2BwiLuScBrcSZVT7pPAsGNXxdcISrHCUFrP7 qZpJugrztNpy8x1+gnK8dMLJG6hfBymzXs2WhhK2c9cfY7fUc0yTVy2dVocxkWjt UNPZtiHvJfkLG2gz5iZQV68NVpcx+dT+BnGw78kPewuPJzDEfzxNigrvBRd465hN uD/aigZvTS/MhZwb0zWxuI+mLt6GiYF55LJkSA3icVw== 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=aP/VcN DHALhU6Xta1QvVXnuuxxl+BLBWpfA2WKGKmtY=; b=fUNm4yDAtUJUEUhrktoZog lR7XWNhy2fEL11FDhm4cIa/r/GOIYmIG2SCwMd2vgtv6ZgDwzhOY+Ggi/FRQ/s/k gT844TTf6OLk2WwMwj+Su2tHbZW83BDGZsG6UmTNNbSv+SRt9grhdCczQtFKh5fh cHbEAHflsjxABjbm6o1Hlq8Pgl/waIVEZcdWlkVIGZPitN3V2I0b7K4G+ZNcYC6N FkBw1xOhr2rysPzKWrMLZcroXKMZoQtX8itbPA0FrV4OpqXK+Fq584YIhWN+q80p TbCv3YoHBPImVgvsWgF1NVtle7d4BICyvQ0o/g/lYMoXg2bIKebi+ect0ugMRnRg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrkeefgdehiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Aug 2021 08:54:25 -0400 (EDT) Date: Thu, 12 Aug 2021 05:54:21 -0700 From: Andres Freund To: Amit Kapila Cc: pgsql-hackers , Dilip Kumar , Masahiko Sawada , Tom Lane , pgsql-committers Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o Message-ID: <20210812125421.qwfa7tganpp674mc@alap3.anarazel.de> References: <20210807190131.2bm24acbebl4wl6i@alap3.anarazel.de> <20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de> <20210812082237.in7l5x3rc4gxhgjh@alap3.anarazel.de> <20210812124819.5mrurb6ueizmqgru@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210812124819.5mrurb6ueizmqgru@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2021-08-12 05:48:19 -0700, Andres Freund wrote: > I think SharedFileSetInit() needs a comment explaining that it needs to be > called in a process-lifetime memory context if used without dsm > segments. Because otherwise SharedFileSetDeleteOnProcExit() will access > already freed memory (both for filesetlist and the SharedFileSet itself). Oh. And I think it's not ok that SharedFileSetDeleteAll() unconditionally does SharedFileSetUnregister(). SharedFileSetUnregister() asserts out if there's no match, but DSM based sets are never entered into filesetlist. So one cannot have a non-DSM and DSM set coexisting. Which seems surprising. Greetings, Andres Freund