From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: reindexdb: Skip reindexing temporary tables and indexes.
Date: Mon, 30 Sep 2024 02:18:13 +0000
Message-ID: <E1sv5zJ-001Vc4-7V@gemulon.postgresql.org> (raw)
reindexdb: Skip reindexing temporary tables and indexes.
Reindexing temp tables or indexes of other sessions is not allowed.
However, reindexdb in parallel mode previously listed them as
the objects to process, leading to failures.
This commit ensures reindexdb in parallel mode skips temporary tables
and indexes by adding a condition based on the relpersistence column
in pg_class to the object listing queries, preventing these issues.
Note that this commit does not affect reindexdb when temporary tables
or indexes are explicitly specified using the -t or -j options;
reindexdb in that case still does not skip them and can cause an error.
Back-patch to v13 where parallel mode was introduced in reindexdb.
Author: Fujii Masao
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/5f37ee56-14fb-44fe-9150-9eb97e10538b@oss.nttdata.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/20cfec896c6a20ca436f634b0ffa3582d7b9425c
Modified Files
--------------
src/bin/scripts/reindexdb.c | 4 ++++
1 file changed, 4 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: reindexdb: Skip reindexing temporary tables and indexes.
In-Reply-To: <E1sv5zJ-001Vc4-7V@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox