Re: [PATCH] Refactor SLRU to always use long file names
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Aleksander Alekseev <aleksander@tigerdata.com>,
pgsql-hackers@lists.postgresql.org
Cc: Rustam ALLAKOV <rustamallakov@gmail.com>,
Michael Paquier <michael@paquier.xyz>
Date: 2026-01-06T15:28:25Z
Lists: pgsql-hackers
On 06/01/2026 17:18, Aleksander Alekseev wrote:
> +static void
> +check_slru_segment_filenames(void)
> +{
> + int i;
> + static const char* dirs[] = {
> + "pg_xact",
> + "pg_commit_ts",
> + "pg_multixact/offsets",
> + "pg_multixact/members",
> + "pg_subtrans",
> + "pg_serial",
> + };
> +
> + if(old_cluster.controldata.cat_ver >= SLRU_SEG_FILENAMES_CHANGE_CAT_VER)
> + return;
> +
> + for (i = 0; i < sizeof(dirs)/sizeof(dirs[0]); i++)
> + rename_slru_segments(dirs[i]);
> +}
Since commit bd8d9c9bdf "Widen MultiXactOffset to 64 bits",
"pg_multixact/members" should not be in that list anymore.
Also, it seems misleading that a function called "check_*" doesn't
merely check for things, but renames files. Also, it seems silly to
first copy/link the files with the old short names, and rename them
later. Could we copy/link them with the new long names to begin with?
(No comment on whether this is a good idea in general or the rest of the
patch)
- Heikki
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Widen MultiXactOffset to 64 bits
- bd8d9c9bdfa0 19 (unreleased) cited
-
Index SLRUs by 64-bit integers rather than by 32-bit integers
- 4ed8f0913bfd 17.0 cited