pgsql: Make pg_createsubscriber more wary about quoting connection para

2024-06-30 Thread Tom Lane
Make pg_createsubscriber more wary about quoting connection parameters. The original coding here could fail with database names, user names, etc that contain spaces or other special characters. As partial test coverage, extend the 040_pg_createsubscriber.pl test script so that it uses a generated

pgsql: Make pg_createsubscriber warn if publisher has two-phase commit

2024-06-30 Thread Tom Lane
Make pg_createsubscriber warn if publisher has two-phase commit enabled. pg_createsubscriber currently always sets up logical replication with two-phase commit disabled. Improving that is not going to happen for v17. In the meantime, document the deficiency, and adjust pg_createsubscriber so tha

pgsql: Add pg_combinebackup --copy option

2024-06-30 Thread Tomas Vondra
Add pg_combinebackup --copy option Introduces --copy as an alternative to --clone and --copy-file-range. This option simply picks the default mode to copy files, as if none of the options was specified. This makes pg_combinebackup options more consistent with pg_upgrade, and it makes testing simpl

pgsql: Add PG_TEST_PG_COMBINEBACKUP_MODE

2024-06-30 Thread Tomas Vondra
Add PG_TEST_PG_COMBINEBACKUP_MODE Introduces an environment variable PG_TEST_PG_COMBINEBACKUP_MODE, that determines copy mode used by pg_combinebackup in TAP tests. Defaults to "--copy" but may be set to "--clone" or "--copy-file-range" to use the alternative stategies. Reported-by: Peter Eisentr

pgsql: Add headers needed by pg_combinebackup --clone

2024-06-30 Thread Tomas Vondra
Add headers needed by pg_combinebackup --clone The code for file cloning existed, but was not reachable as it relied on constants from missing headers. Due to that, on Linux --clone always failed with error: file cloning not supported on this platform Fixed by including the missing headers to

pgsql: Temporarily(?) weaken new pg_createsubscriber test on Windows.

2024-06-30 Thread Tom Lane
Temporarily(?) weaken new pg_createsubscriber test on Windows. Don't include double-quotes (") in the generated database names on Windows. Doing so tickles a bug in older versions of IPC::Run, which fail to quote command line arguments correctly for that platform. Possibly we can revert this aft

pgsql: Run pgperltidy

2024-06-30 Thread Michael Paquier
Run pgperltidy This is required before the creation of a new branch. pgindent is clean, as well as is reformat-dat-files. perltidy version is v20230309, as documented in pgindent's README. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7dcc6f8e6d7a0eb0ce908023112

pgsql: Branch REL_17_STABLE was created

2024-06-30 Thread noreply
Branch REL_17_STABLE was created. View: https://git.postgresql.org/pg/shortlog/refs/heads/REL_17_STABLE

pgsql: Stamp HEAD as 18devel.

2024-06-30 Thread Michael Paquier
Stamp HEAD as 18devel. Let the hacking begin ... Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e26810d01d441a457217a6eae9c2989fba29b80f Modified Files -- configure| 18 +- configure.ac |2 +- doc/src/sgml/fileli

pgsql: Adapt REL_17_STABLE to its new status as a stable branch

2024-06-30 Thread Michael Paquier
Adapt REL_17_STABLE to its new status as a stable branch Per the checklist in RELEASE_CHANGES for the creation of a new stable branch, this commit does the following things: - Arm gen_node_support.pl's nodetag ABI stability, based on the contents of nodetags.h. - Update URLs of top-level README an

pgsql: Improve enlargeStringInfo's ERROR message

2024-06-30 Thread David Rowley
Improve enlargeStringInfo's ERROR message Until now, when an enlargeStringInfo() call would cause the StringInfo to exceed its maximum size, we reported an "out of memory" error. This is misleading as it's no such thing. Here we remove the "out of memory" text and replace it with something more

pgsql: Remove PgStat_KindInfo.named_on_disk

2024-06-30 Thread Michael Paquier
Remove PgStat_KindInfo.named_on_disk This field is used to track if a stats kind can use a custom format representation on disk when reading or writing its stats case. On HEAD, this exists for replication slots stats, that need a mapping between an internal index ID and the slot names. named_on_

pgsql: doc: Add ACL acronym for "Access Control List"

2024-06-30 Thread Michael Paquier
doc: Add ACL acronym for "Access Control List" Five places across the docs use this abbreviation, so let's use a proper acronym entry for it. Per suggestion from me. Author: Joel Jacobson Reviewed-by: Nathan Bossart, David G. Johnston Discussion: https://postgr.es/m/9253b872-dbb1-42a6-a79e-b1e9

pgsql: Format better code for xact_decode()'s XLOG_XACT_INVALIDATIONS

2024-06-30 Thread Michael Paquier
Format better code for xact_decode()'s XLOG_XACT_INVALIDATIONS This makes the code more consistent with the surroundings. Author: ChangAo Chen Reviewed-by: Ashutosh Bapat Discussion: https://postgr.es/m/caexhw5tntevuh58skddttcx3yu_5_pdsc8mdp-q2hc9ppzh...@mail.gmail.com Branch -- master Det

pgsql: Further weaken new pg_createsubscriber test on Windows.

2024-06-30 Thread Tom Lane
Further weaken new pg_createsubscriber test on Windows. Also omit backslashes (\) in the generated database names on Windows. As before, perhaps we can revert this after updating affected buildfarm animals. Discussion: https://postgr.es/m/2509767.1719773...@sss.pgh.pa.us Branch -- REL_17_STA

pgsql: Further weaken new pg_createsubscriber test on Windows.

2024-06-30 Thread Tom Lane
Further weaken new pg_createsubscriber test on Windows. Also omit backslashes (\) in the generated database names on Windows. As before, perhaps we can revert this after updating affected buildfarm animals. Discussion: https://postgr.es/m/2509767.1719773...@sss.pgh.pa.us Branch -- master De

pgsql: Use pgstat_kind_infos to read fixed shared statistics

2024-06-30 Thread Michael Paquier
Use pgstat_kind_infos to read fixed shared statistics Shared statistics with a fixed number of objects are read from the stats file in pgstat_read_statsfile() using members of PgStat_ShmemControl and following an order based on their PgStat_Kind value. Instead of being explicit, this commit chang

pgsql: Apply COPT to CXXFLAGS as well

2024-06-30 Thread Peter Eisentraut
Apply COPT to CXXFLAGS as well The main use of that make variable is to pass in -Werror. It makes sense to apply this to C++ as well. Reviewed-by: Tom Lane Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/message-id/flat/fe3e200c-edee-44e0-a6e3-d45dca72873b%40eisentraut.org

pgsql: Rename standby_slot_names to synchronized_standby_slots.

2024-06-30 Thread Amit Kapila
Rename standby_slot_names to synchronized_standby_slots. The standby_slot_names GUC allows the specification of physical standby slots that must be synchronized before the logical walsenders associated with logical failover slots. However, for this purpose, the GUC name is too generic. Author: Ho

pgsql: Rename standby_slot_names to synchronized_standby_slots.

2024-06-30 Thread Amit Kapila
Rename standby_slot_names to synchronized_standby_slots. The standby_slot_names GUC allows the specification of physical standby slots that must be synchronized before the logical walsenders associated with logical failover slots. However, for this purpose, the GUC name is too generic. Author: Ho

pgsql: doc: Clarify that pg_attrdef also stores generation expressions

2024-06-30 Thread Peter Eisentraut
doc: Clarify that pg_attrdef also stores generation expressions This was documented with pg_attribute but not with pg_attrdef. Reported-by: jian he Discussion: https://www.postgresql.org/message-id/CACJufxE+E-iYmBnZVZHiYA+WpyZZVv7BfiBLpo=t70ezhdu...@mail.gmail.com Branch -- master Details

pgsql: Remove useless code

2024-06-30 Thread Peter Eisentraut
Remove useless code BuildDescForRelation() goes out of its way to fill in ->constr->has_not_null, but that value is not used for anything later, so this code can all be removed. Note that BuildDescForRelation() doesn't make any effort to fill in the rest of ->constr, so there is no claim that tha

pgsql: Remove useless initializations

2024-06-30 Thread Peter Eisentraut
Remove useless initializations The struct is already initialized to all zeros right before this, and randomly initializing a few but not all fields to zero again has no technical or educational value. Reviewed-by: Tomasz Rybak Discussion: https://www.postgresql.org/message-id/flat/a368248e-69e4