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 1mFwtW-0000gR-N2 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Aug 2021 11:04:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mFwtV-0007D3-LT for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Aug 2021 11:04:33 +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 1mFwtV-0007Cu-DQ for pgsql-hackers@lists.postgresql.org; Tue, 17 Aug 2021 11:04:33 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFwtT-0003l0-DM for pgsql-hackers@postgresql.org; Tue, 17 Aug 2021 11:04:32 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 51D735C0064; Tue, 17 Aug 2021 07:04:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 17 Aug 2021 07:04:30 -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=iTq+YEENI2CPoqFJu1bbkU9b/86 +qssSA25PgV0GmAk=; b=qGt4U5JXDYgGfbyGxfkTNK2TxSfQYYxTTErT180SYOS I0vgREzXlNmvi3OWvc7WGaqZHw/1nKwtCR6BKL2FhVwWR97C+WUTJQR51L7A8H14 dyzM8n2aMjtOsqbrBj0Jf8iYdt03B0EGQWfsJEaW0iMItvzjCU1o1dbqJon9UF2H ytIMOd5glFi+dSDfhKdIIdNG9ISlB8QIRAv3X8vJAr67GrzmhPX5KjacHuTgHBJp 2VSRj99yJlYBcb2sgPpAirzi7tJgQJ5EJPyJsSosCKWUKORIsza14u5e1iZheI9m /SyDsEY+eVb8snvDSR/XbhuBKdF943tGdkPlpYBKwiQ== 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=iTq+YE ENI2CPoqFJu1bbkU9b/86+qssSA25PgV0GmAk=; b=YlSV2aQP2aZJzySlvdbcCe v5UDQUAFo0tIEtCra8FyXT/LZqnwlepVjhTFwcUzLNxJKLP+1xhwR9hZudGChtc5 l/K0NilokQBdJr09hQgHtGSLiD3cKhwAS49oX+MHcYoV/7Eg7zYa49u0m6uTorux CqpaL2a6/Bn2IFakpwAh81WutW2e4nR1esWRxjIF5jxBZOnDBIsLRXMW/HCJidmO WouQTnY2FcvTt0tu4dkXkdwuIqx+2DaLTOE45wX5t51MsWkKmS1kaLn0HLh/wPGs +pMWnH2lO7WwqLVn/odsTThuOH0tOS65R9AQKr+TP9KzXuwgZIW0oefZdbMuwXBA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrleefgdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Aug 2021 07:04:29 -0400 (EDT) Date: Tue, 17 Aug 2021 04:04:27 -0700 From: Andres Freund To: Amit Kapila Cc: Dilip Kumar , Thomas Munro , pgsql-hackers , Masahiko Sawada , Tom Lane Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o Message-ID: <20210817110427.yd5i7iostgqf5gvt@alap3.anarazel.de> References: <20210812082237.in7l5x3rc4gxhgjh@alap3.anarazel.de> <20210812124819.5mrurb6ueizmqgru@alap3.anarazel.de> <20210813155940.kp7mdg3ynl2hodqk@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2021-08-17 10:54:30 +0530, Amit Kapila wrote: > 5. How can we provide a strict mechanism to not allow to use dsm APIs > for non-dsm FileSet? One idea could be that we can have a variable > (probably bool) in SharedFileSet structure which will be initialized > in SharedFileSetInit based on whether the caller has provided dsm > segment. Then in other DSM-based APIs, we can check if it is used for > the wrong type. Well, isn't the issue here that it's not a shared file set in case you explicitly don't want to share it? ISTM that the proper way to address this would be to split out a FileSet from SharedFileSet that's then used for worker.c and sharedfileset.c. Rather than making sharedfileset.c support a non-shared mode. Greetings, Andres Freund