pgsql: Add assertion check for WAL receiver state during stream-archive

2025-11-03 Thread Michael Paquier
Add assertion check for WAL receiver state during stream-archive transition When the startup process switches from streaming to archive as WAL source, we avoid calling ShutdownWalRcv() if the WAL receiver is not streaming, based on WalRcvStreaming(). WALRCV_STOPPING is a state set by ShutdownWalR

pgsql: Add WalRcvGetState() to retrieve the state of a WAL receiver

2025-11-03 Thread Michael Paquier
Add WalRcvGetState() to retrieve the state of a WAL receiver This has come up as useful as an alternative of WalRcvStreaming(), to be able to do sanity checks based on the state of a WAL receiver. This will be used in a follow-up commit. Author: Xuneng Zhou Discussion: https://postgr.es/m/19093

pgsql: Fix unconditional WAL receiver shutdown during stream-archive tr

2025-11-03 Thread Michael Paquier
Fix unconditional WAL receiver shutdown during stream-archive transition Commit b4f584f9d2a1 (affecting v15~, later backpatched down to 13 as of 3635a0a35aaf) introduced an unconditional WAL receiver shutdown when switching from streaming to archive WAL sources. This causes problems during a time

pgsql: Fix unconditional WAL receiver shutdown during stream-archive tr

2025-11-03 Thread Michael Paquier
Fix unconditional WAL receiver shutdown during stream-archive transition Commit b4f584f9d2a1 (affecting v15~, later backpatched down to 13 as of 3635a0a35aaf) introduced an unconditional WAL receiver shutdown when switching from streaming to archive WAL sources. This causes problems during a time

pgsql: Fix unconditional WAL receiver shutdown during stream-archive tr

2025-11-03 Thread Michael Paquier
Fix unconditional WAL receiver shutdown during stream-archive transition Commit b4f584f9d2a1 (affecting v15~, later backpatched down to 13 as of 3635a0a35aaf) introduced an unconditional WAL receiver shutdown when switching from streaming to archive WAL sources. This causes problems during a time

pgsql: Fix unconditional WAL receiver shutdown during stream-archive tr

2025-11-03 Thread Michael Paquier
Fix unconditional WAL receiver shutdown during stream-archive transition Commit b4f584f9d2a1 (affecting v15~, later backpatched down to 13 as of 3635a0a35aaf) introduced an unconditional WAL receiver shutdown when switching from streaming to archive WAL sources. This causes problems during a time

pgsql: Fix unconditional WAL receiver shutdown during stream-archive tr

2025-11-03 Thread Michael Paquier
Fix unconditional WAL receiver shutdown during stream-archive transition Commit b4f584f9d2a1 (affecting v15~, later backpatched down to 13 as of 3635a0a35aaf) introduced an unconditional WAL receiver shutdown when switching from streaming to archive WAL sources. This causes problems during a time

pgsql: Fix unconditional WAL receiver shutdown during stream-archive tr

2025-11-03 Thread Michael Paquier
Fix unconditional WAL receiver shutdown during stream-archive transition Commit b4f584f9d2a1 (affecting v15~, later backpatched down to 13 as of 3635a0a35aaf) introduced an unconditional WAL receiver shutdown when switching from streaming to archive WAL sources. This causes problems during a time

pgsql: Fix unconditional WAL receiver shutdown during stream-archive tr

2025-11-03 Thread Michael Paquier
Fix unconditional WAL receiver shutdown during stream-archive transition Commit b4f584f9d2a1 (affecting v15~, later backpatched down to 13 as of 3635a0a35aaf) introduced an unconditional WAL receiver shutdown when switching from streaming to archive WAL sources. This causes problems during a time

pgsql: Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CO

2025-11-03 Thread Noah Misch
Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CONFLICT. Author: Mikhail Nikalayeu Reviewed-by: Noah Misch Discussion: https://postgr.es/m/CANtu0ojXmqjmEzp-=ajsxjsde76iasrghbok0qtyhimb_me...@mail.gmail.com Backpatch-through: 13 Branch -- master Details --- https://git.p

pgsql: Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CO

2025-11-03 Thread Noah Misch
Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CONFLICT. Author: Mikhail Nikalayeu Reviewed-by: Noah Misch Discussion: https://postgr.es/m/CANtu0ojXmqjmEzp-=ajsxjsde76iasrghbok0qtyhimb_me...@mail.gmail.com Backpatch-through: 13 Branch -- REL_13_STABLE Details --- https:

pgsql: Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CO

2025-11-03 Thread Noah Misch
Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CONFLICT. Author: Mikhail Nikalayeu Reviewed-by: Noah Misch Discussion: https://postgr.es/m/CANtu0ojXmqjmEzp-=ajsxjsde76iasrghbok0qtyhimb_me...@mail.gmail.com Backpatch-through: 13 Branch -- REL_18_STABLE Details --- https:

pgsql: Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CO

2025-11-03 Thread Noah Misch
Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CONFLICT. Author: Mikhail Nikalayeu Reviewed-by: Noah Misch Discussion: https://postgr.es/m/CANtu0ojXmqjmEzp-=ajsxjsde76iasrghbok0qtyhimb_me...@mail.gmail.com Backpatch-through: 13 Branch -- REL_17_STABLE Details --- https:

pgsql: Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CO

2025-11-03 Thread Noah Misch
Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CONFLICT. Author: Mikhail Nikalayeu Reviewed-by: Noah Misch Discussion: https://postgr.es/m/CANtu0ojXmqjmEzp-=ajsxjsde76iasrghbok0qtyhimb_me...@mail.gmail.com Backpatch-through: 13 Branch -- REL_14_STABLE Details --- https:

pgsql: Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CO

2025-11-03 Thread Noah Misch
Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CONFLICT. Author: Mikhail Nikalayeu Reviewed-by: Noah Misch Discussion: https://postgr.es/m/CANtu0ojXmqjmEzp-=ajsxjsde76iasrghbok0qtyhimb_me...@mail.gmail.com Backpatch-through: 13 Branch -- REL_16_STABLE Details --- https:

pgsql: Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CO

2025-11-03 Thread Noah Misch
Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CONFLICT. Author: Mikhail Nikalayeu Reviewed-by: Noah Misch Discussion: https://postgr.es/m/CANtu0ojXmqjmEzp-=ajsxjsde76iasrghbok0qtyhimb_me...@mail.gmail.com Backpatch-through: 13 Branch -- REL_15_STABLE Details --- https:

pgsql: Fix outdated comment of COPY in gram.y.

2025-11-03 Thread Masahiko Sawada
Fix outdated comment of COPY in gram.y. Author: ChangAo Chen Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e7ccb247b38fff342c13aa7bdf61ce5ab45b2a85 Modified Files --

pgsql: Add \pset options for boolean value display

2025-11-03 Thread Álvaro Herrera
Add \pset options for boolean value display New \pset variables display_true and display_false allow the user to change how true and false values are displayed. Author: David G. Johnston Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/cakfquwyts3vnfq5aokheakmtnmfj443mw2kfswkwzn7fio

pgsql: Prevent setting a column as identity if its not-null constraint

2025-11-03 Thread Álvaro Herrera
Prevent setting a column as identity if its not-null constraint is invalid We don't allow null values to appear in identity-generated columns in other ways, so we shouldn't let unvalidated not-null constraints do it either. Oversight in commit a379061a22a8. Author: jian he Backpatch-through: 18

pgsql: Prevent setting a column as identity if its not-null constraint

2025-11-03 Thread Álvaro Herrera
Prevent setting a column as identity if its not-null constraint is invalid We don't allow null values to appear in identity-generated columns in other ways, so we shouldn't let unvalidated not-null constraints do it either. Oversight in commit a379061a22a8. Author: jian he Backpatch-through: 18

pgsql: Remove WaitPMResult enum in pg_createsubscriber

2025-11-03 Thread Álvaro Herrera
Remove WaitPMResult enum in pg_createsubscriber A simple boolean suffices. This is cosmetic, so no backpatch. Author: Álvaro Herrera Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f242dbced

pgsql: Add wal_fpi_bytes to VACUUM and ANALYZE logs

2025-11-03 Thread Michael Paquier
Add wal_fpi_bytes to VACUUM and ANALYZE logs The new wal_fpi_bytes counter calculates the total amount of full page images inserted in WAL records, in bytes. This commit adds this information to VACUUM and ANALYZE logs alongside the existing counters, building upon f9a09aa29520. Author: Shinya K

pgsql: Sort guc_parameters.dat alphabetically by name

2025-11-03 Thread Peter Eisentraut
Sort guc_parameters.dat alphabetically by name The order in this list was previously pretty random and had grown organically over time. This made it unnecessarily cumbersome to maintain these lists, as there was no clear guidelines about where to put new entries. Also, after the merger of the ty