pgsql: Remove, from stable branches, the new assertion of no pg_dump OI

2025-08-10 Thread Noah Misch
Remove, from stable branches, the new assertion of no pg_dump OID sort. Commit 0decd5e89db9f5edb9b27351082f0d74aae7a9b6 recently added the assertion to confirm dump order remains independent of OID values. The assertion remained reachable via DO_DEFAULT_ACL. Given the release wrap tomorrow, make

pgsql: Remove, from stable branches, the new assertion of no pg_dump OI

2025-08-10 Thread Noah Misch
Remove, from stable branches, the new assertion of no pg_dump OID sort. Commit 0decd5e89db9f5edb9b27351082f0d74aae7a9b6 recently added the assertion to confirm dump order remains independent of OID values. The assertion remained reachable via DO_DEFAULT_ACL. Given the release wrap tomorrow, make

pgsql: Remove, from stable branches, the new assertion of no pg_dump OI

2025-08-10 Thread Noah Misch
Remove, from stable branches, the new assertion of no pg_dump OID sort. Commit 0decd5e89db9f5edb9b27351082f0d74aae7a9b6 recently added the assertion to confirm dump order remains independent of OID values. The assertion remained reachable via DO_DEFAULT_ACL. Given the release wrap tomorrow, make

pgsql: Remove, from stable branches, the new assertion of no pg_dump OI

2025-08-10 Thread Noah Misch
Remove, from stable branches, the new assertion of no pg_dump OID sort. Commit 0decd5e89db9f5edb9b27351082f0d74aae7a9b6 recently added the assertion to confirm dump order remains independent of OID values. The assertion remained reachable via DO_DEFAULT_ACL. Given the release wrap tomorrow, make

pgsql: Remove, from stable branches, the new assertion of no pg_dump OI

2025-08-10 Thread Noah Misch
Remove, from stable branches, the new assertion of no pg_dump OID sort. Commit 0decd5e89db9f5edb9b27351082f0d74aae7a9b6 recently added the assertion to confirm dump order remains independent of OID values. The assertion remained reachable via DO_DEFAULT_ACL. Given the release wrap tomorrow, make

pgsql: Remove, from stable branches, the new assertion of no pg_dump OI

2025-08-10 Thread Noah Misch
Remove, from stable branches, the new assertion of no pg_dump OID sort. Commit 0decd5e89db9f5edb9b27351082f0d74aae7a9b6 recently added the assertion to confirm dump order remains independent of OID values. The assertion remained reachable via DO_DEFAULT_ACL. Given the release wrap tomorrow, make

pgsql: Sort dump objects independent of OIDs, for the 7 holdout object

2025-07-31 Thread Noah Misch
Sort dump objects independent of OIDs, for the 7 holdout object types. pg_dump sorts objects by their logical names, e.g. (nspname, relname, tgname), before dependency-driven reordering. That removes one source of logically-identical databases differing in their schema-only dumps. In other words,

pgsql: pg_dump: provide a stable sort order for rules.

2025-07-31 Thread Noah Misch
pg_dump: provide a stable sort order for rules. Previously, we sorted rules by schema name and then rule name; if that wasn't unique, we sorted by rule OID. This can be problematic for comparing dumps from databases with different histories, especially since certain rule names like "_RETURN" are

pgsql: Sort dump objects independent of OIDs, for the 7 holdout object

2025-07-31 Thread Noah Misch
Sort dump objects independent of OIDs, for the 7 holdout object types. pg_dump sorts objects by their logical names, e.g. (nspname, relname, tgname), before dependency-driven reordering. That removes one source of logically-identical databases differing in their schema-only dumps. In other words,

pgsql: Sort dump objects independent of OIDs, for the 7 holdout object

2025-07-31 Thread Noah Misch
Sort dump objects independent of OIDs, for the 7 holdout object types. pg_dump sorts objects by their logical names, e.g. (nspname, relname, tgname), before dependency-driven reordering. That removes one source of logically-identical databases differing in their schema-only dumps. In other words,

pgsql: pg_dump: provide a stable sort order for rules.

2025-07-31 Thread Noah Misch
pg_dump: provide a stable sort order for rules. Previously, we sorted rules by schema name and then rule name; if that wasn't unique, we sorted by rule OID. This can be problematic for comparing dumps from databases with different histories, especially since certain rule names like "_RETURN" are

pgsql: pg_dump: provide a stable sort order for rules.

2025-07-31 Thread Noah Misch
pg_dump: provide a stable sort order for rules. Previously, we sorted rules by schema name and then rule name; if that wasn't unique, we sorted by rule OID. This can be problematic for comparing dumps from databases with different histories, especially since certain rule names like "_RETURN" are

pgsql: pg_dump: provide a stable sort order for rules.

2025-07-31 Thread Noah Misch
pg_dump: provide a stable sort order for rules. Previously, we sorted rules by schema name and then rule name; if that wasn't unique, we sorted by rule OID. This can be problematic for comparing dumps from databases with different histories, especially since certain rule names like "_RETURN" are

pgsql: Sort dump objects independent of OIDs, for the 7 holdout object

2025-07-31 Thread Noah Misch
Sort dump objects independent of OIDs, for the 7 holdout object types. pg_dump sorts objects by their logical names, e.g. (nspname, relname, tgname), before dependency-driven reordering. That removes one source of logically-identical databases differing in their schema-only dumps. In other words,

pgsql: Sort dump objects independent of OIDs, for the 7 holdout object

2025-07-31 Thread Noah Misch
Sort dump objects independent of OIDs, for the 7 holdout object types. pg_dump sorts objects by their logical names, e.g. (nspname, relname, tgname), before dependency-driven reordering. That removes one source of logically-identical databases differing in their schema-only dumps. In other words,

pgsql: pg_dump: provide a stable sort order for rules.

2025-07-31 Thread Noah Misch
pg_dump: provide a stable sort order for rules. Previously, we sorted rules by schema name and then rule name; if that wasn't unique, we sorted by rule OID. This can be problematic for comparing dumps from databases with different histories, especially since certain rule names like "_RETURN" are

pgsql: Sort dump objects independent of OIDs, for the 7 holdout object

2025-07-31 Thread Noah Misch
Sort dump objects independent of OIDs, for the 7 holdout object types. pg_dump sorts objects by their logical names, e.g. (nspname, relname, tgname), before dependency-driven reordering. That removes one source of logically-identical databases differing in their schema-only dumps. In other words,

pgsql: Sort dump objects independent of OIDs, for the 7 holdout object

2025-07-31 Thread Noah Misch
Sort dump objects independent of OIDs, for the 7 holdout object types. pg_dump sorts objects by their logical names, e.g. (nspname, relname, tgname), before dependency-driven reordering. That removes one source of logically-identical databases differing in their schema-only dumps. In other words,

pgsql: Fix a pg_dump scenario for platforms where SEEK_CUR != 1.

2025-06-03 Thread Noah Misch
Fix a pg_dump scenario for platforms where SEEK_CUR != 1. POSIX allows such platforms. Given the lack of complaints, we may not currently test on such a platform. This is new in v18 (commit 7d5c83b4e90c7156655f98b7312a30ae5eeb4d27), so no back-patch. Branch -- master Details --- https:

Re: pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio

2025-05-15 Thread Noah Misch
On Wed, May 14, 2025 at 04:38:06PM +0800, sean wrote: >I read the patch you commit to pgsql, and i found there also some other > routine which >will still call pg_encoding_mblen to get char length. >I have no idea why these routine don't have to replaced by call > pg_encoding_mblen_or

pgsql: Remove GLOBALTABLESPACE_OID assert for locked buffers.

2025-05-10 Thread Noah Misch
Remove GLOBALTABLESPACE_OID assert for locked buffers. Commit f4ece891fc2f3f96f0571720a1ae30db8030681b added the assertion in an attempt to catch some defects even after VACUUM FULL or REINDEX. However, IsCatalogTextUniqueIndexOid(tag.relNumber) always returns false after a relfilenode change, pro

pgsql: Refactor test_escape.c for additional ways of testing.

2025-05-08 Thread Noah Misch
Refactor test_escape.c for additional ways of testing. Start the file with static functions not specific to pe_test_vectors tests. This way, new tests can use them without disrupting the file's layout. Change report_result() PQExpBuffer arguments to plain strings. Back-patch to v13 (all supporte

pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio

2025-05-08 Thread Noah Misch
last byte of the allocation was the last byte of a virtual memory page. Some malloc() implementations take measures against that, making the SIGSEGV hard to reach. Back-patch to v13 (all supported versions). Author: Noah Misch Author: Andres Freund Reviewed-by: Masahiko Sawada Backpatch-through

pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio

2025-05-08 Thread Noah Misch
last byte of the allocation was the last byte of a virtual memory page. Some malloc() implementations take measures against that, making the SIGSEGV hard to reach. Back-patch to v13 (all supported versions). Author: Noah Misch Author: Andres Freund Reviewed-by: Masahiko Sawada Backpatch-through

pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio

2025-05-08 Thread Noah Misch
last byte of the allocation was the last byte of a virtual memory page. Some malloc() implementations take measures against that, making the SIGSEGV hard to reach. Back-patch to v13 (all supported versions). Author: Noah Misch Author: Andres Freund Reviewed-by: Masahiko Sawada Backpatch-through

pgsql: Refactor test_escape.c for additional ways of testing.

2025-05-08 Thread Noah Misch
Refactor test_escape.c for additional ways of testing. Start the file with static functions not specific to pe_test_vectors tests. This way, new tests can use them without disrupting the file's layout. Change report_result() PQExpBuffer arguments to plain strings. Back-patch to v13 (all supporte

pgsql: Refactor test_escape.c for additional ways of testing.

2025-05-08 Thread Noah Misch
Refactor test_escape.c for additional ways of testing. Start the file with static functions not specific to pe_test_vectors tests. This way, new tests can use them without disrupting the file's layout. Change report_result() PQExpBuffer arguments to plain strings. Back-patch to v13 (all supporte

pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio

2025-05-08 Thread Noah Misch
last byte of the allocation was the last byte of a virtual memory page. Some malloc() implementations take measures against that, making the SIGSEGV hard to reach. Back-patch to v13 (all supported versions). Author: Noah Misch Author: Andres Freund Reviewed-by: Masahiko Sawada Backpatch-through

pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio

2025-05-08 Thread Noah Misch
last byte of the allocation was the last byte of a virtual memory page. Some malloc() implementations take measures against that, making the SIGSEGV hard to reach. Back-patch to v13 (all supported versions). Author: Noah Misch Author: Andres Freund Reviewed-by: Masahiko Sawada Backpatch-through

pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio

2025-05-08 Thread Noah Misch
last byte of the allocation was the last byte of a virtual memory page. Some malloc() implementations take measures against that, making the SIGSEGV hard to reach. Back-patch to v13 (all supported versions). Author: Noah Misch Author: Andres Freund Reviewed-by: Masahiko Sawada Backpatch-through

pgsql: Refactor test_escape.c for additional ways of testing.

2025-05-08 Thread Noah Misch
Refactor test_escape.c for additional ways of testing. Start the file with static functions not specific to pe_test_vectors tests. This way, new tests can use them without disrupting the file's layout. Change report_result() PQExpBuffer arguments to plain strings. Back-patch to v13 (all supporte

pgsql: Refactor test_escape.c for additional ways of testing.

2025-05-08 Thread Noah Misch
Refactor test_escape.c for additional ways of testing. Start the file with static functions not specific to pe_test_vectors tests. This way, new tests can use them without disrupting the file's layout. Change report_result() PQExpBuffer arguments to plain strings. Back-patch to v13 (all supporte

pgsql: Refactor test_escape.c for additional ways of testing.

2025-05-08 Thread Noah Misch
Refactor test_escape.c for additional ways of testing. Start the file with static functions not specific to pe_test_vectors tests. This way, new tests can use them without disrupting the file's layout. Change report_result() PQExpBuffer arguments to plain strings. Back-patch to v13 (all supporte

pgsql: Doc: stop implying recommendation of insecure search_path value.

2025-05-01 Thread Noah Misch
Doc: stop implying recommendation of insecure search_path value. SQL "SET search_path = 'pg_catalog, pg_temp'" is silently equivalent to "SET search_path = pg_temp, pg_catalog, "pg_catalog, pg_temp"" instead of the intended "SET search_path = pg_catalog, pg_temp". (The intent was a two-element se

pgsql: Doc: stop implying recommendation of insecure search_path value.

2025-05-01 Thread Noah Misch
Doc: stop implying recommendation of insecure search_path value. SQL "SET search_path = 'pg_catalog, pg_temp'" is silently equivalent to "SET search_path = pg_temp, pg_catalog, "pg_catalog, pg_temp"" instead of the intended "SET search_path = pg_catalog, pg_temp". (The intent was a two-element se

pgsql: Doc: stop implying recommendation of insecure search_path value.

2025-05-01 Thread Noah Misch
Doc: stop implying recommendation of insecure search_path value. SQL "SET search_path = 'pg_catalog, pg_temp'" is silently equivalent to "SET search_path = pg_temp, pg_catalog, "pg_catalog, pg_temp"" instead of the intended "SET search_path = pg_catalog, pg_temp". (The intent was a two-element se

pgsql: Doc: stop implying recommendation of insecure search_path value.

2025-05-01 Thread Noah Misch
Doc: stop implying recommendation of insecure search_path value. SQL "SET search_path = 'pg_catalog, pg_temp'" is silently equivalent to "SET search_path = pg_temp, pg_catalog, "pg_catalog, pg_temp"" instead of the intended "SET search_path = pg_catalog, pg_temp". (The intent was a two-element se

pgsql: Doc: stop implying recommendation of insecure search_path value.

2025-05-01 Thread Noah Misch
Doc: stop implying recommendation of insecure search_path value. SQL "SET search_path = 'pg_catalog, pg_temp'" is silently equivalent to "SET search_path = pg_temp, pg_catalog, "pg_catalog, pg_temp"" instead of the intended "SET search_path = pg_catalog, pg_temp". (The intent was a two-element se

pgsql: Doc: stop implying recommendation of insecure search_path value.

2025-05-01 Thread Noah Misch
Doc: stop implying recommendation of insecure search_path value. SQL "SET search_path = 'pg_catalog, pg_temp'" is silently equivalent to "SET search_path = pg_temp, pg_catalog, "pg_catalog, pg_temp"" instead of the intended "SET search_path = pg_catalog, pg_temp". (The intent was a two-element se

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: Assert lack of hazardous buffer locks before possible catalog re

2025-04-17 Thread Noah Misch
Assert lack of hazardous buffer locks before possible catalog read. Commit 0bada39c83a150079567a6e97b1a25a198f30ea3 fixed a bug of this kind, which existed in all branches for six days before detection. While the probability of reaching the trouble was low, the disruption was extreme. No new bac

pgsql: Fix test races between syscache-update-pruned.spec and autovacuu

2025-04-10 Thread Noah Misch
Fix test races between syscache-update-pruned.spec and autovacuum. This spec fails ~3% of my Valgrind runs, and the spec has failed on Valgrind buildfarm member skink at a similar rate. Two problems contributed to that: - A competing buffer pin triggered VACUUM's lazy_scan_noprune() path, causin

pgsql: Fix test races between syscache-update-pruned.spec and autovacuu

2025-04-09 Thread Noah Misch
Fix test races between syscache-update-pruned.spec and autovacuum. This spec fails ~3% of my Valgrind runs, and the spec has failed on Valgrind buildfarm member skink at a similar rate. Two problems contributed to that: - A competing buffer pin triggered VACUUM's lazy_scan_noprune() path, causin

pgsql: Make dblink interruptible, via new libpqsrv APIs.

2025-04-03 Thread Noah Misch
Make dblink interruptible, via new libpqsrv APIs. This replaces dblink's blocking libpq calls, allowing cancellation and allowing DROP DATABASE (of a database not involved in the query). Apart from explicit dblink_cancel_query() calls, dblink still doesn't cancel the remote side. The replacement

pgsql: Add helper library for use of libpq inside the server environmen

2025-04-03 Thread Noah Misch
Add helper library for use of libpq inside the server environment Currently dblink and postgres_fdw don't process interrupts during connection establishment. Besides preventing query cancellations etc, this can lead to undetected deadlocks, as global barriers are not processed. Libpqwalreceiver i

pgsql: Make dblink interruptible, via new libpqsrv APIs.

2025-04-03 Thread Noah Misch
Make dblink interruptible, via new libpqsrv APIs. This replaces dblink's blocking libpq calls, allowing cancellation and allowing DROP DATABASE (of a database not involved in the query). Apart from explicit dblink_cancel_query() calls, dblink still doesn't cancel the remote side. The replacement

pgsql: Make dblink interruptible, via new libpqsrv APIs.

2025-04-03 Thread Noah Misch
Make dblink interruptible, via new libpqsrv APIs. This replaces dblink's blocking libpq calls, allowing cancellation and allowing DROP DATABASE (of a database not involved in the query). Apart from explicit dblink_cancel_query() calls, dblink still doesn't cancel the remote side. The replacement

pgsql: Make dblink interruptible, via new libpqsrv APIs.

2025-04-03 Thread Noah Misch
Make dblink interruptible, via new libpqsrv APIs. This replaces dblink's blocking libpq calls, allowing cancellation and allowing DROP DATABASE (of a database not involved in the query). Apart from explicit dblink_cancel_query() calls, dblink still doesn't cancel the remote side. The replacement

pgsql: Add helper library for use of libpq inside the server environmen

2025-04-03 Thread Noah Misch
Add helper library for use of libpq inside the server environment Currently dblink and postgres_fdw don't process interrupts during connection establishment. Besides preventing query cancellations etc, this can lead to undetected deadlocks, as global barriers are not processed. Libpqwalreceiver i

pgsql: Add helper library for use of libpq inside the server environmen

2025-04-03 Thread Noah Misch
Add helper library for use of libpq inside the server environment Currently dblink and postgres_fdw don't process interrupts during connection establishment. Besides preventing query cancellations etc, this can lead to undetected deadlocks, as global barriers are not processed. Libpqwalreceiver i

pgsql: Fix "make clean" for new TAP suite.

2025-03-23 Thread Noah Misch
Fix "make clean" for new TAP suite. Commit 28f04984f0c240b76e61f00cd247554fbc850056 missed this. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f0446384ea7c4274894d7f5b215bfc2496ace85d Modified Files -- src/interfaces/ecpg/preproc/Makefile | 1 + 1 file

pgsql: Test postmaster with program_options_handling_ok() et al.

2025-01-26 Thread Noah Misch
Test postmaster with program_options_handling_ok() et al. Most executables already get that testing. To occupy the customary 001_basic.pl name, this renumbers the new-in-October tests of src/test/postmaster/t. Reviewed by Thomas Munro. Discussion: https://postgr.es/m/20241215022701.a1.nmi...@go

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Merge copies of converting an XID to a FullTransactionId.

2025-01-25 Thread Noah Misch
Merge copies of converting an XID to a FullTransactionId. Assume twophase.c is the performance-sensitive caller, and preserve its choice of unlikely() branch hint. Add some retrospective rationale for that choice. Back-patch to v17, for the next commit to use it. Reviewed (in earlier versions)

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Merge copies of converting an XID to a FullTransactionId.

2025-01-25 Thread Noah Misch
Merge copies of converting an XID to a FullTransactionId. Assume twophase.c is the performance-sensitive caller, and preserve its choice of unlikely() branch hint. Add some retrospective rationale for that choice. Back-patch to v17, for the next commit to use it. Reviewed (in earlier versions)

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Disable runningcheck for src/test/modules/injection_points/specs

2025-01-25 Thread Noah Misch
Disable runningcheck for src/test/modules/injection_points/specs. Directory "injection_points" has specified NO_INSTALLCHECK since before commit c35f419d6efbdf1a050250d84b687e6705917711 added the specs, but that commit neglected to disable the corresponding meson runningcheck. The alternative woul

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Disable runningcheck for src/test/modules/injection_points/specs

2025-01-25 Thread Noah Misch
Disable runningcheck for src/test/modules/injection_points/specs. Directory "injection_points" has specified NO_INSTALLCHECK since before commit c35f419d6efbdf1a050250d84b687e6705917711 added the specs, but that commit neglected to disable the corresponding meson runningcheck. The alternative woul

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: In REASSIGN OWNED of a database, lock the tuple as mandated.

2024-12-28 Thread Noah Misch
In REASSIGN OWNED of a database, lock the tuple as mandated. Commit aac2c9b4fde889d13f859c233c2523345e72d32b mandated such locking and attempted to fulfill that mandate, but it missed REASSIGN OWNED. Hence, it remained possible to lose VACUUM's inplace update of datfrozenxid if a REASSIGN OWNED pr

pgsql: In REASSIGN OWNED of a database, lock the tuple as mandated.

2024-12-28 Thread Noah Misch
In REASSIGN OWNED of a database, lock the tuple as mandated. Commit aac2c9b4fde889d13f859c233c2523345e72d32b mandated such locking and attempted to fulfill that mandate, but it missed REASSIGN OWNED. Hence, it remained possible to lose VACUUM's inplace update of datfrozenxid if a REASSIGN OWNED pr

pgsql: In REASSIGN OWNED of a database, lock the tuple as mandated.

2024-12-28 Thread Noah Misch
In REASSIGN OWNED of a database, lock the tuple as mandated. Commit aac2c9b4fde889d13f859c233c2523345e72d32b mandated such locking and attempted to fulfill that mandate, but it missed REASSIGN OWNED. Hence, it remained possible to lose VACUUM's inplace update of datfrozenxid if a REASSIGN OWNED pr

pgsql: In REASSIGN OWNED of a database, lock the tuple as mandated.

2024-12-28 Thread Noah Misch
In REASSIGN OWNED of a database, lock the tuple as mandated. Commit aac2c9b4fde889d13f859c233c2523345e72d32b mandated such locking and attempted to fulfill that mandate, but it missed REASSIGN OWNED. Hence, it remained possible to lose VACUUM's inplace update of datfrozenxid if a REASSIGN OWNED pr

pgsql: In REASSIGN OWNED of a database, lock the tuple as mandated.

2024-12-28 Thread Noah Misch
In REASSIGN OWNED of a database, lock the tuple as mandated. Commit aac2c9b4fde889d13f859c233c2523345e72d32b mandated such locking and attempted to fulfill that mandate, but it missed REASSIGN OWNED. Hence, it remained possible to lose VACUUM's inplace update of datfrozenxid if a REASSIGN OWNED pr

pgsql: In REASSIGN OWNED of a database, lock the tuple as mandated.

2024-12-28 Thread Noah Misch
In REASSIGN OWNED of a database, lock the tuple as mandated. Commit aac2c9b4fde889d13f859c233c2523345e72d32b mandated such locking and attempted to fulfill that mandate, but it missed REASSIGN OWNED. Hence, it remained possible to lose VACUUM's inplace update of datfrozenxid if a REASSIGN OWNED pr

pgsql: Fix elog(FATAL) before PostmasterMain() or just after fork().

2024-12-10 Thread Noah Misch
Fix elog(FATAL) before PostmasterMain() or just after fork(). Since commit 97550c0711972a9856b5db751539bbaf2f4c, these failed with "PANIC: proc_exit() called in child process" due to uninitialized or stale MyProcPid. That was reachable if close() failed in ClosePostmasterPorts() or setlocale

pgsql: Fix elog(FATAL) before PostmasterMain() or just after fork().

2024-12-10 Thread Noah Misch
Fix elog(FATAL) before PostmasterMain() or just after fork(). Since commit 97550c0711972a9856b5db751539bbaf2f4c, these failed with "PANIC: proc_exit() called in child process" due to uninitialized or stale MyProcPid. That was reachable if close() failed in ClosePostmasterPorts() or setlocale

pgsql: Fix elog(FATAL) before PostmasterMain() or just after fork().

2024-12-10 Thread Noah Misch
Fix elog(FATAL) before PostmasterMain() or just after fork(). Since commit 97550c0711972a9856b5db751539bbaf2f4c, these failed with "PANIC: proc_exit() called in child process" due to uninitialized or stale MyProcPid. That was reachable if close() failed in ClosePostmasterPorts() or setlocale

pgsql: Fix elog(FATAL) before PostmasterMain() or just after fork().

2024-12-10 Thread Noah Misch
Fix elog(FATAL) before PostmasterMain() or just after fork(). Since commit 97550c0711972a9856b5db751539bbaf2f4c, these failed with "PANIC: proc_exit() called in child process" due to uninitialized or stale MyProcPid. That was reachable if close() failed in ClosePostmasterPorts() or setlocale

pgsql: Fix elog(FATAL) before PostmasterMain() or just after fork().

2024-12-10 Thread Noah Misch
Fix elog(FATAL) before PostmasterMain() or just after fork(). Since commit 97550c0711972a9856b5db751539bbaf2f4c, these failed with "PANIC: proc_exit() called in child process" due to uninitialized or stale MyProcPid. That was reachable if close() failed in ClosePostmasterPorts() or setlocale

pgsql: Fix elog(FATAL) before PostmasterMain() or just after fork().

2024-12-10 Thread Noah Misch
Fix elog(FATAL) before PostmasterMain() or just after fork(). Since commit 97550c0711972a9856b5db751539bbaf2f4c, these failed with "PANIC: proc_exit() called in child process" due to uninitialized or stale MyProcPid. That was reachable if close() failed in ClosePostmasterPorts() or setlocale

pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL

2024-11-25 Thread Noah Misch
Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE. This WARNING appeared because SearchSysCacheLocked1() read cc_relisshared before catcache initialization, when the field is false unconditionally. On the basis of reading false there, it constructed a locktag as though pg_tab

pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL

2024-11-25 Thread Noah Misch
Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE. This WARNING appeared because SearchSysCacheLocked1() read cc_relisshared before catcache initialization, when the field is false unconditionally. On the basis of reading false there, it constructed a locktag as though pg_tab

pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL

2024-11-25 Thread Noah Misch
Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE. This WARNING appeared because SearchSysCacheLocked1() read cc_relisshared before catcache initialization, when the field is false unconditionally. On the basis of reading false there, it constructed a locktag as though pg_tab

pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL

2024-11-25 Thread Noah Misch
Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE. This WARNING appeared because SearchSysCacheLocked1() read cc_relisshared before catcache initialization, when the field is false unconditionally. On the basis of reading false there, it constructed a locktag as though pg_tab

pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL

2024-11-25 Thread Noah Misch
Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE. This WARNING appeared because SearchSysCacheLocked1() read cc_relisshared before catcache initialization, when the field is false unconditionally. On the basis of reading false there, it constructed a locktag as though pg_tab

pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL

2024-11-25 Thread Noah Misch
Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE. This WARNING appeared because SearchSysCacheLocked1() read cc_relisshared before catcache initialization, when the field is false unconditionally. On the basis of reading false there, it constructed a locktag as though pg_tab

pgsql: Test "options=-crole=" and "ALTER DATABASE SET role".

2024-11-24 Thread Noah Misch
Test "options=-crole=" and "ALTER DATABASE SET role". Commit 7b88529f4363994450bd4cd3c172006a8a77e222 fixed a regression spanning these features, but it didn't test them. It did test code paths sufficient for their present implementations, so no back-patch. Reported by Matthew Woodcraft. Discus

pgsql: Fix per-session activation of ALTER {ROLE|DATABASE} SET role.

2024-11-15 Thread Noah Misch
cherry-picking the CVE-2024-10978 fixes, default to including this, too. (This fixes an unintended side effect of fixing CVE-2024-10978.) Back-patch to v12, like that commit. The release team decided to include v12, despite the original intent to halt v12 commits earlier this week. Tom Lane and Noah

  1   2   3   4   5   6   7   8   9   10   >