From: | Fujii Masao <fujii(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: reindexdb: Skip reindexing temporary tables and indexes. |
Date: | 2024-09-30 02:19:42 |
Message-ID: | E1sv60j-001VfA-Jl@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/9410f7cbf4ff7bb0b94238b8d5fee4aecf157374
Modified Files
--------------
src/bin/scripts/reindexdb.c | 4 ++++
1 file changed, 4 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2024-09-30 03:15:52 | pgsql: Add num_done counter to the pg_stat_checkpointer view. |
Previous Message | Fujii Masao | 2024-09-30 02:19:29 | pgsql: reindexdb: Skip reindexing temporary tables and indexes. |