pgsql: doc: Fix memory context level in pg_log_backend_memory_contexts(

2025-04-20 Thread Fujii Masao
doc: Fix memory context level in pg_log_backend_memory_contexts() example. Commit d9e03864b6b changed the memory context level numbers shown by pg_log_backend_memory_contexts() to be 1-based. However, the example in the documentation was not updated and still used 0-based numbering. This commit u

pgsql: Fix a few more duplicate words in comments

2025-04-20 Thread David Rowley
Fix a few more duplicate words in comments Similar to 84fd3bc14 but these ones were found using a regex that can span multiple lines. Author: David Rowley Discussion: https://postgr.es/m/CAApHDvrMcr8XD107H3NV=WHgyBcu=sx5+7=warr-n_cwuqd...@mail.gmail.com Branch -- master Details --- ht

pgsql: Fix a few duplicate words in comments

2025-04-20 Thread David Rowley
Fix a few duplicate words in comments These are all new to v18 Author: David Rowley Discussion: https://postgr.es/m/CAApHDvrMcr8XD107H3NV=WHgyBcu=sx5+7=warr-n_cwuqd...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/84fd3bc141039b32f25c3c9f6157163a

pgsql: Comment on need to MarkBufferDirty() if omitting DELAY_CHKPT_STA

2025-04-20 Thread Noah Misch
Comment on need to MarkBufferDirty() if omitting DELAY_CHKPT_START. Blocking checkpoint phase 2 requires MarkBufferDirty() and BUFFER_LOCK_EXCLUSIVE; neither suffices by itself. transam/README documents this, citing SyncOneBuffer(). Update the DELAY_CHKPT_START documentation to say this. Expand

pgsql: Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.

2025-04-20 Thread Noah Misch
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f. Commit 7102070329d8147246d2791321f9915c3b5abf31 fixed a similar bug, but it missed the case of database-wide ANALYZE ("use_own_xacts" mode). Commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 changed consequences from silent discard of a pg

pgsql: Test restartpoints in archive recovery.

2025-04-20 Thread Noah Misch
Test restartpoints in archive recovery. v14 commit 1f95181b44c843729caaa688f74babe9403b5850 and its v13 equivalent caused timing-dependent failures in archive recovery, at restartpoints. The symptom was "invalid magic number in log segment X, offset 0", "unexpected pageaddr X in log segment

pgsql: Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.

2025-04-20 Thread Noah Misch
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f. Commit 7102070329d8147246d2791321f9915c3b5abf31 fixed a similar bug, but it missed the case of database-wide ANALYZE ("use_own_xacts" mode). Commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 changed consequences from silent discard of a pg

pgsql: Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.

2025-04-20 Thread Noah Misch
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f. Commit 7102070329d8147246d2791321f9915c3b5abf31 fixed a similar bug, but it missed the case of database-wide ANALYZE ("use_own_xacts" mode). Commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 changed consequences from silent discard of a pg

pgsql: Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.

2025-04-20 Thread Noah Misch
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f. Commit 7102070329d8147246d2791321f9915c3b5abf31 fixed a similar bug, but it missed the case of database-wide ANALYZE ("use_own_xacts" mode). Commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 changed consequences from silent discard of a pg

pgsql: Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.

2025-04-20 Thread Noah Misch
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f. Commit 7102070329d8147246d2791321f9915c3b5abf31 fixed a similar bug, but it missed the case of database-wide ANALYZE ("use_own_xacts" mode). Commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 changed consequences from silent discard of a pg

pgsql: Test restartpoints in archive recovery.

2025-04-20 Thread Noah Misch
Test restartpoints in archive recovery. v14 commit 1f95181b44c843729caaa688f74babe9403b5850 and its v13 equivalent caused timing-dependent failures in archive recovery, at restartpoints. The symptom was "invalid magic number in log segment X, offset 0", "unexpected pageaddr X in log segment

pgsql: Test restartpoints in archive recovery.

2025-04-20 Thread Noah Misch
Test restartpoints in archive recovery. v14 commit 1f95181b44c843729caaa688f74babe9403b5850 and its v13 equivalent caused timing-dependent failures in archive recovery, at restartpoints. The symptom was "invalid magic number in log segment X, offset 0", "unexpected pageaddr X in log segment

pgsql: Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.

2025-04-20 Thread Noah Misch
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f. Commit 7102070329d8147246d2791321f9915c3b5abf31 fixed a similar bug, but it missed the case of database-wide ANALYZE ("use_own_xacts" mode). Commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 changed consequences from silent discard of a pg

pgsql: Test restartpoints in archive recovery.

2025-04-20 Thread Noah Misch
Test restartpoints in archive recovery. v14 commit 1f95181b44c843729caaa688f74babe9403b5850 and its v13 equivalent caused timing-dependent failures in archive recovery, at restartpoints. The symptom was "invalid magic number in log segment X, offset 0", "unexpected pageaddr X in log segment

pgsql: Test restartpoints in archive recovery.

2025-04-20 Thread Noah Misch
Test restartpoints in archive recovery. v14 commit 1f95181b44c843729caaa688f74babe9403b5850 and its v13 equivalent caused timing-dependent failures in archive recovery, at restartpoints. The symptom was "invalid magic number in log segment X, offset 0", "unexpected pageaddr X in log segment

pgsql: Test restartpoints in archive recovery.

2025-04-20 Thread Noah Misch
Test restartpoints in archive recovery. v14 commit 1f95181b44c843729caaa688f74babe9403b5850 and its v13 equivalent caused timing-dependent failures in archive recovery, at restartpoints. The symptom was "invalid magic number in log segment X, offset 0", "unexpected pageaddr X in log segment

pgsql: Fix issue with ORDER BY / DISTINCT aggregates and FILTER

2025-04-20 Thread David Rowley
Fix issue with ORDER BY / DISTINCT aggregates and FILTER 1349d2790 added support so that aggregate functions with an ORDER BY or DISTINCT clause could make use of presorted inputs to avoid an implicit sort within nodeAgg.c. That commit failed to consider that a FILTER clause may exist that filter

pgsql: Fix issue with ORDER BY / DISTINCT aggregates and FILTER

2025-04-20 Thread David Rowley
Fix issue with ORDER BY / DISTINCT aggregates and FILTER 1349d2790 added support so that aggregate functions with an ORDER BY or DISTINCT clause could make use of presorted inputs to avoid an implicit sort within nodeAgg.c. That commit failed to consider that a FILTER clause may exist that filter

pgsql: Fix issue with ORDER BY / DISTINCT aggregates and FILTER

2025-04-20 Thread David Rowley
Fix issue with ORDER BY / DISTINCT aggregates and FILTER 1349d2790 added support so that aggregate functions with an ORDER BY or DISTINCT clause could make use of presorted inputs to avoid an implicit sort within nodeAgg.c. That commit failed to consider that a FILTER clause may exist that filter