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 1soXBb-00ByNi-9t for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Sep 2024 23:55:48 +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 1soXBa-00AbKW-HC for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Sep 2024 23:55:46 +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 1soXBa-00AbEP-67 for pgsql-hackers@lists.postgresql.org; Wed, 11 Sep 2024 23:55:46 +0000 Received: from fhigh7-smtp.messagingengine.com ([103.168.172.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soXBX-000iCb-5I for pgsql-hackers@lists.postgresql.org; Wed, 11 Sep 2024 23:55:44 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id 246DB114022B; Wed, 11 Sep 2024 19:55:42 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Wed, 11 Sep 2024 19:55:42 -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:subject :subject:to:to; s=fm1; t=1726098942; x=1726185342; bh=XWy4svsT/s WjAwZqAHUf5EAsmHcaCTsncSXuqt9afJI=; b=MTOyvYR4Xyo2MiVNNGYBmOC0Iu m9kjpLp9LjiQ1egBDiZDhhQ2roo/gO6/LIH2j3BkVKIOi4J8OdkXxJu0mI2DwA+7 sMBdW903eHI93ilhnKOEN0euwa0Qq9KInacCOT5ri6kcj5EOEtt8uf8oSPSVsRSc PjAKULmyZ9U8f1e5cSjvOCgYggVRzc9LtNzXrrOIqU5dj4UzV/IBtBWkvAgsJ3hk pa151s+gkMUMBDEeIevQkKKPCi8Dta+L6mJ5TY8d7NJ5XzjtIXOxRDDAwfd9fDAe SqFM0sU7sBv4TjGw7Si9dZAYgeZL6tseVlUgv/LFIF5tL5y00XV6SaOPgltw== 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:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1726098942; x=1726185342; bh=XWy4svsT/sWjAwZqAHUf5EAsmHca CTsncSXuqt9afJI=; b=V0nKTH7solJ2MoVE/qN+rwHdOT3eywRtIDSparZisXwa uNmrYpCLeUSvp+Wlkqs3KYS6IgHY3QvlO4iXjpwl5xOnWhrjiYB3ptuiZ35Ltg8R WZnP9pfdtSbML79JJRO5PaplZ8Xe2eJL6Ey3b47DLq+3PNX+yrGEMY2isnk21pbt b3eUoSLzZvbwYbdaFFu0UKQLnZOH69a1Yku0IkGDf6g9smOknTcJYcayH2WMMP+w ZMNb45KWigpYBEvVMaHMN7hlj9JB6vzP0z9ys0VSgQFH2GXomfD4eFlD/w0O/+XT YT/4nl3cACU6tFk9eckrUyKvkgMpPEZgh/E7+nalkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudejvddgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhf gggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruc eomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteel ieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhes phgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouh htpdhrtghpthhtoheprghlvghkshgrnhguvghrsehtihhmvghstggrlhgvrdgtohhmpdhr tghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqh hlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Sep 2024 19:55:40 -0400 (EDT) Date: Thu, 12 Sep 2024 08:55:35 +0900 From: Michael Paquier To: Aleksander Alekseev Cc: PostgreSQL Hackers Subject: Re: [PATCH] Refactor SLRU to always use long file names Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ygILfdm7rcBtz08s" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ygILfdm7rcBtz08s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 11, 2024 at 04:07:06PM +0300, Aleksander Alekseev wrote: > Commit 4ed8f0913bfd introduced long SLRU file names. The proposed > patch removes SlruCtl->long_segment_names flag and makes SLRU always > use long file names. This simplifies both the code and the API. > Corresponding changes to pg_upgrade are included. That's leaner, indeed. > One drawback I see is that technically SLRU is an exposed API and > changing it may affect third-party code. I'm not sure if we should > seriously worry about this. Firstly, the change is trivial and > secondly, it's not clear whether such third-party code even exists (we > broke this API just recently in 4ed8f0913bfd and no one complained). Any third-party code using custom SLRUs would need to take care of handling their upgrade path outside pg_upgrade. Not sure there are any of them, TBH, but let's see. > I didn't include any tests for the new pg_upgrade code. To my > knowledge we test it manually, with buildfarm members and during > alpha- and beta-testing periods. Please let me know if you think there > should be a corresponding TAP test. Removing the old API means that it is impossible to test a move from short to long file names. That's OK by me to rely on the pg_upgrade paths in the buildfarm code. We have a few of them. There is one thing I am wondering, here, though, which is to think harder about a validity check at the end of 002_pg_upgrade.pl to make sure that all the SLRU use long file names after running the tests. That would mean thinking about a mechanism to list all of them from a backend, rather than hardcode a list of them. Perhaps that's not worth it, just dropping an idea in the bucket of ideas. I would guess in the shape of a catalog that's able to represent at SQL level all the SLRUs that exist in a backend. -- Michael --ygILfdm7rcBtz08s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmbiLfcACgkQnvQgOdby QH1Fdg/9H8Osq4XYbTR2HKCOP3GXLz4HO1bHxgKZri9gO1WLHTSwQ4iJX+BZq4T/ 2Tl8r+e3p4IwAAH6xYWR4myxFeh2w2WOZXhXpLemw891Nm7Rsr7wa/Gf+krra0tA eFbp4Da478Xt9dh/Byms4HugxLeBli6g/KGYrx2LNY5SHbkfb1RYuxHXxKJuSd/m ILFOGWUmmKavmUCa2ffNCI4CmmxlW4oMCmZEvA63o0ESOftRB8q+SqpMTZt0usqY WziZzq/xnFFlWz3ndG/7nhl6FxmIeM85HkzY09wb1ve0DWgmbiGX89GmHet0h2TM 2rFq08s7eH8uy+bYOJ+T8XcSgbbx2myvxNVykOQ4a5eSxsmRNjA0ZPgSUsiap1nu pG1smX4sdoqUJ1v+/3/wAvyWZqC/vuzwbHXILokWQjBOIyHGJayP3EvVM2H09U06 yBR9htIatSl+ZRQa+SLU4C0Z3Lwk2OBJHRBYQV2ptRjTgW/Oh9sanY92dQb1z9Y7 cuJbMLTuR08h+azht/JjGiX2MU0c1YJdmrBPaUNmUeuhqQaENFJ0AquM1f8HsqZ+ kQhavbHjw6JBXZaFVfk5yNKRS24g+ryIwH5A5wP4QAFcp+j3BV9RI2eDMAANqvE+ jQVreYDkmKYtBONqeBt3KhpQIFjieZ+E4W/1efB+LNcOcFaalZw= =I7yS -----END PGP SIGNATURE----- --ygILfdm7rcBtz08s--