pgsql: Fix inconsistent quoting for some options in TAP tests

2025-03-16 Thread Michael Paquier
Fix inconsistent quoting for some options in TAP tests This commit addresses some inconsistencies with how the options of some routines from PostgreSQL/Test/ are written, mainly for init() and init_from_backup() in Cluster.pm. These are written as unquoted, except in the locations updated here.

pgsql: Apply more consistent style for command options in TAP tests

2025-03-16 Thread Michael Paquier
Apply more consistent style for command options in TAP tests This commit reshapes the grammar of some commands to apply a more consistent style across the board, following rules similar to ce1b0f9da03e: - Elimination of some pointless used-once variables. - Use of long options, to self-document be

pgsql: Revert "Add redo LSN to pgstats files"

2025-03-16 Thread Michael Paquier
Revert "Add redo LSN to pgstats files" This reverts commit b860848232aa, that was added as a prerequisite for the support of pgstats data flush across checkpoints, linking a pgstats file to a specific checkpoint redo LSN. As reported, this is proving to be currently problematic when going through

pgsql: pg_dump, pg_dumpall, pg_restore: Add --no-policies option.

2025-03-16 Thread Tom Lane
pg_dump, pg_dumpall, pg_restore: Add --no-policies option. Add --no-policies option to control row level security policy handling in dump and restore operations. When this option is used, both CREATE POLICY commands and ALTER TABLE ... ENABLE ROW LEVEL SECURITY commands are excluded from dumps and

pgsql: contrib/isn: Make weak mode a GUC setting, and fix related funct

2025-03-16 Thread Tom Lane
contrib/isn: Make weak mode a GUC setting, and fix related functions. isn's weak mode used to be a simple static variable, settable only via the isn_weak(boolean) function. This wasn't optimal, as this means it doesn't respect transactions nor respond to RESET ALL. This patch makes isn.weak a GU

pgsql: reindexdb: Fix the index-level REINDEX with multiple jobs

2025-03-16 Thread Alexander Korotkov
reindexdb: Fix the index-level REINDEX with multiple jobs 47f99a407d introduced a parallel index-level REINDEX. The code was written assuming that running run_reindex_command() with 'async == true' can schedule a number of queries for a connection. That's not true, and the second query sent usin

pgsql: reindexdb: Fix the index-level REINDEX with multiple jobs

2025-03-16 Thread Alexander Korotkov
reindexdb: Fix the index-level REINDEX with multiple jobs 47f99a407d introduced a parallel index-level REINDEX. The code was written assuming that running run_reindex_command() with 'async == true' can schedule a number of queries for a connection. That's not true, and the second query sent usin

pgsql: pg_createsubscriber: Remove some code bloat in the atexit() call

2025-03-16 Thread Michael Paquier
pg_createsubscriber: Remove some code bloat in the atexit() callback This commit adjusts some code added by e117cfb2f6c6 in the atexit() callback of pg_createsubscriber.c, in charge of performing post-failure cleanup actions. The code loops over all the databases specified, and it is changed here