Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qcEBw-00EMUb-Id for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Sep 2023 00:08:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qcEBt-000wmT-MA for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Sep 2023 00:08:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qcEBs-000wmL-57 for pgsql-bugs@lists.postgresql.org; Sat, 02 Sep 2023 00:08:41 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qcEBj-002F3z-W7 for pgsql-bugs@lists.postgresql.org; Sat, 02 Sep 2023 00:08:38 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 858BA5C00AD; Fri, 1 Sep 2023 20:08:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 01 Sep 2023 20:08:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1693613310; x=1693699710; bh=2/ pT7P5OdxS95NMtWqsDVBDkHX/bo2oCGcdf6kCQad8=; b=uEk4r2dkzYSXnrKHTM 1Jhazp+pndxZXVR0DHaZYsNz9MUL5tOdkxge2kfKxhMvbcSU+pERyLDZCOSyzXIm 4C9GZ+wTYFWmemDSijqp5bdoYqFxuKE9pO8nbrgVmO2bVqsEcfHECAJaINoQj/iJ NsX8LZo1tdnPq6RxofEosPUsDF2Asa7gvFQcLwqvDGbx6zPsH8sSUijn9qEFKH/M VdxynNkU+Fkv3+x0zxQqYYQhRAoJ+iNDNSoqWI3MOsi2E3ArY1sy8LAzYhnnleeQ Jx2CX+FYIOxGrJqmhSNx3/TTn+Gnuh5r1bwiOsmiHwtlp/Baw1EI4wHAxKZwTikc ZQdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1693613310; x=1693699710; bh=2/pT7P5OdxS95 NMtWqsDVBDkHX/bo2oCGcdf6kCQad8=; b=g70If1rrqzsFDLlPQJIuwjQmvOSFA i4qoYqacN5Kr0yId3j9DhXe+xUOE/7dtwJcj/E6hURGij99908xvdoPuGF1Rlrz8 bT2FdKtKJExUSLDWDXFFNIB3hpMtvlRdXgAxtsT1BQ/OrV6bV+p3cFzbiVexBcI4 6DZlORnYtvs3UVMp75xzCjcnD+/Q5mUNhvXRigU6B3SX8MuwWBe2ACVldKrOwXZs I6uDxnw02QSvoiVHYs8WU37CRHhPksrTFWn8si7hjIDCddDoK3qUTMmk/NlqIuVs hzSPSde2HUK4H92j5BTj8A0DtJppOn/SDXIbTwxehrmEfSFpDgHN2N41w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegfedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Sep 2023 20:08:27 -0400 (EDT) Date: Sat, 2 Sep 2023 09:08:22 +0900 From: Michael Paquier To: Nathan Bossart Cc: Andres Freund , Jacob Speidel , Will Mortensen , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon Message-ID: References: <20230614223012.cfyzxyfnt3ggqkt4@awork3.anarazel.de> <20230812004812.4yev47iili57u4hc@awork3.anarazel.de> <20230901025613.GB3097511@nathanxps13> <20230901152024.GA3175143@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ktT/+chXxrp3pwhT" Content-Disposition: inline In-Reply-To: <20230901152024.GA3175143@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ktT/+chXxrp3pwhT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 01, 2023 at 08:20:24AM -0700, Nathan Bossart wrote: > Something along those lines seems fine to me. FWIW this is what I had in > my head: >=20 > It is important that MyDatabaseId only be set once we are sure that the > target database can no longer be concurrently dropped or renamed. Some > code depends on this. For example, without this guarantee, > pgstat_update_dbstats() could create entries for databases that were > just dropped, which will lead to problems down the road. I'm mostly OK with this formulation as well, but without the second sentence and adding as extra that pgstat_update_dbstats() could be specifically called in the shutdown callback of the shared statistics. -- Michael --ktT/+chXxrp3pwhT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmTyfPYACgkQnvQgOdby QH0Zjw/8DlE3sx6aOG3Oczqfelv3JEujilUOAWJbFHxHnwqVtyXBKDxdRPSVlZAM gGWNkQ+n+Krz46EpA9SyQ6Zu4LJlRcQ2BqoAnVFws2Mp8/NXGcVoQFLMHGXrhAYm Ejjx5TaPlz/a6Yy2UJK10bwJLtz/xo3qOsIaiFG2IKLkvjJ+BHJsL7ZZcTKaWdKS ErFnGxJ1uC+SGHYjuqA9MVLeN//KW484j47fEUZ4DOL1NRdptLWR4feY0l4sURgd zw6jeZuD90iHpli0LExEsZwJV6RYapNHAUBS9CuJEaxMNuLivkMbLnxHp8ExsZmm W3mXIjlbv03w1/NajAxbfjR2Jcc1k0q9RPnK8vV6NUvGkyK7xvT6G9SmaCnVBmzf h2/dNrlAv7g0vZre1yQrbjMZDW6/ymRfTaOSt9KSpMix2Pee+e+LyDPhCQ2XqF4t 12z93YigsmVgUc3q3bvgdpr3GauvyyPER/q2EC6vcnJx6acRGXaDqdtmpvbuReqU UZNjBT5R9AqdIzvixsrD7OJINj7wg2Rn74LR0VVRZOYmgpi5DliNqYIZ1jHchtqh r14OONyl8F7QTSu6j1a2fUspa2zOAP9LKfMjEEfcZSFomO71qnR3t3ocgc7FSS/y OZrZvwIZnf77PxGSQ3/cXV//UAhaVUH3MoE3KgARJFTyc7Tv4jE= =Ki2T -----END PGP SIGNATURE----- --ktT/+chXxrp3pwhT--