pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Adjust commentary for WaitEventLWLock in wait_event_names.txt.

2025-09-04 Thread Nathan Bossart
Adjust commentary for WaitEventLWLock in wait_event_names.txt. In addition to changing a couple of references for clarity, this commit combines the two similar comments. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1129d3e4c8883f25642d1f44750b4d36e29ec006 Modifi

pgsql: Clean up newly added guc_tables.inc.c

2025-09-04 Thread Peter Eisentraut
Clean up newly added guc_tables.inc.c There was a missing makefile rule to clean up the guc_tables.inc.c symlink in src/include/. Oversight in commit 63599896545. Author: Nathan Bossart Discussion: https://www.postgresql.org/message-id/flat/dae6fe89-1e0c-4c3f-8d92-19d23374fb10%40eisentraut.org

pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE.

2025-09-04 Thread Dean Rasheed
Fix replica identity check for INSERT ON CONFLICT DO UPDATE. If an INSERT has an ON CONFLICT DO UPDATE clause, the executor must check that the target relation supports UPDATE as well as INSERT. In particular, it must check that the target relation has a REPLICA IDENTITY if it publishes updates. F

pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE.

2025-09-04 Thread Dean Rasheed
Fix replica identity check for INSERT ON CONFLICT DO UPDATE. If an INSERT has an ON CONFLICT DO UPDATE clause, the executor must check that the target relation supports UPDATE as well as INSERT. In particular, it must check that the target relation has a REPLICA IDENTITY if it publishes updates. F

pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE.

2025-09-04 Thread Dean Rasheed
Fix replica identity check for INSERT ON CONFLICT DO UPDATE. If an INSERT has an ON CONFLICT DO UPDATE clause, the executor must check that the target relation supports UPDATE as well as INSERT. In particular, it must check that the target relation has a REPLICA IDENTITY if it publishes updates. F

pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE.

2025-09-04 Thread Dean Rasheed
Fix replica identity check for INSERT ON CONFLICT DO UPDATE. If an INSERT has an ON CONFLICT DO UPDATE clause, the executor must check that the target relation supports UPDATE as well as INSERT. In particular, it must check that the target relation has a REPLICA IDENTITY if it publishes updates. F

pgsql: Fix replica identity check for MERGE.

2025-09-04 Thread Dean Rasheed
Fix replica identity check for MERGE. When executing a MERGE, check that the target relation supports all actions mentioned in the MERGE command. Specifically, check that it has a REPLICA IDENTITY if it publishes updates or deletes and the MERGE command contains update or delete actions. Failing t

pgsql: Fix incorrect comment in pgstat_backend.c

2025-09-04 Thread Michael Paquier
Fix incorrect comment in pgstat_backend.c The counters saved from pgWalUsage, used for the difference calculations when flushing the backend WAL stats, are updated when calling pgstat_flush_backend() under PGSTAT_BACKEND_FLUSH_WAL, and not pgstat_report_wal(). The comment updated in this commit r

pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix replica identity check for MERGE.

2025-09-04 Thread Dean Rasheed
Fix replica identity check for MERGE. When executing a MERGE, check that the target relation supports all actions mentioned in the MERGE command. Specifically, check that it has a REPLICA IDENTITY if it publishes updates or deletes and the MERGE command contains update or delete actions. Failing t

pgsql: Fix replica identity check for MERGE.

2025-09-04 Thread Dean Rasheed
Fix replica identity check for MERGE. When executing a MERGE, check that the target relation supports all actions mentioned in the MERGE command. Specifically, check that it has a REPLICA IDENTITY if it publishes updates or deletes and the MERGE command contains update or delete actions. Failing t

pgsql: Change pg_lsn_in_internal() to use soft error reporting

2025-09-04 Thread Michael Paquier
Change pg_lsn_in_internal() to use soft error reporting pg_lsn includes pg_lsn_in_internal() for the purpose of parsing a LSN position for the GUC recovery_target_lsn (21f428ebde39). It relies on a boolean called "have_error" that would be set when the LSN parsing fails, then let its callers hand

pgsql: Fix outdated comments in slru.c

2025-09-04 Thread Michael Paquier
Fix outdated comments in slru.c SlruRecentlyUsed() is an inline function since 53c2a97a9266, not a macro. The description of long_segment_names was missing at the top of SimpleLruInit(), part forgotten in 4ed8f0913bfd. Author: Julien Rouhaud Discussion: https://postgr.es/m/aLpBLMOYwEQkaleF@jrou

pgsql: Fix outdated comments in slru.c

2025-09-04 Thread Michael Paquier
Fix outdated comments in slru.c SlruRecentlyUsed() is an inline function since 53c2a97a9266, not a macro. The description of long_segment_names was missing at the top of SimpleLruInit(), part forgotten in 4ed8f0913bfd. Author: Julien Rouhaud Discussion: https://postgr.es/m/aLpBLMOYwEQkaleF@jrou

pgsql: Switch some numeric-related functions to use soft error reportin

2025-09-04 Thread Michael Paquier
Switch some numeric-related functions to use soft error reporting This commit changes some functions related to the data type numeric to use the soft error reporting rather than a custom boolean flag (called "have_error") that callers of these functions could rely on to bypass the generation of ER

pgsql: Revert recent change to RequestNamedLWLockTranche().

2025-09-04 Thread Nathan Bossart
Revert recent change to RequestNamedLWLockTranche(). Commit 38b602b028 modified this function to allocate enough space for MAX_NAMED_TRANCHES (256) requests, which is likely far more than most clusters need. This commit reverts that change so that it first allocates enough space for only 16 reque