pgsql: Remove unstable test suite added by 525392d57

2025-02-21 Thread Amit Langote
Remove unstable test suite added by 525392d57 The 'cached-plan-inval' test suite, introduced in 525392d57 under src/test/modules/delay_execution, aimed to verify that cached plan invalidation triggers replanning after deferred locks are taken. However, its ExecutorStart_hook-based approach relies

Re: pgsql: Trial fix for old cross-version upgrades.

2025-02-21 Thread Jeff Davis
On Fri, 2025-02-21 at 21:57 -0500, Tom Lane wrote: > Hmm.  I forced my local BF installation to run a v17-to-HEAD upgrade > test, and it still failed, though seemingly with fewer diffs than > the buildfarm is reporting for older branches.  (Diffs attached for > amusement's sake.)  I don't believe w

Re: pgsql: Trial fix for old cross-version upgrades.

2025-02-21 Thread Jeff Davis
On Fri, 2025-02-21 at 21:00 -0500, Tom Lane wrote: > I think we might indeed want that, but it doesn't seem to be the > explanation for the buildfarm failures, because the diffs look > to be consistent across runs which you'd not expect from > autovacuum-driven changes.  I suspect that the problem

Re: pgsql: Trial fix for old cross-version upgrades.

2025-02-21 Thread Tom Lane
Jeff Davis writes: > The version that I committed had the following change to > 002_pg_upgrade.pl: > # Stabilize stats before pg_dumpall. > $oldnode->append_conf('postgresql.conf', 'autovacuum = off'); > $oldnode->restart; > ... > $newnode->append_conf('postgresql.conf', 'autovacuum =

pgsql: Allow lwlocks to be disowned

2025-02-21 Thread Andres Freund
Allow lwlocks to be disowned To implement AIO writes, the backend initiating writes needs to transfer the lock ownership to the AIO subsystem, so the lock held during the write can be released in another backend. Other backends need to be able to "complete" an asynchronously started IO to avoid d

Re: pgsql: Trial fix for old cross-version upgrades.

2025-02-21 Thread Robert Haas
On Fri, Feb 21, 2025 at 7:57 PM Jeff Davis wrote: > I think we need a similar change in the buildfarm client's > TestUpgradeXversion.pm? Is -hackers the right place to discuss that? Yes, I believe -hackers is the right place to discuss that. -- Robert Haas EDB: http://www.enterprisedb.com

Re: pgsql: Trial fix for old cross-version upgrades.

2025-02-21 Thread Jeff Davis
On Thu, 2025-02-20 at 13:17 -0800, Jeff Davis wrote: > On Thu, 2025-02-20 at 18:30 +, Jeff Davis wrote: > > Trial fix for old cross-version upgrades. > > That fixed one problem, but there are other problems with 9.2 > upgrades. The version that I committed had the following change to 002_pg_u

pgsql: Avoid race condition between "GRANT role" and "DROP ROLE".

2025-02-21 Thread Tom Lane
Avoid race condition between "GRANT role" and "DROP ROLE". Concurrently dropping either the granted role or the grantee does not stop GRANT from completing, instead resulting in a dangling role reference in pg_auth_members. That's relatively harmless in the short run, but inconsistent catalog ent

pgsql: pg_resetwal: Add --char-signedness option to change the default

2025-02-21 Thread Masahiko Sawada
pg_resetwal: Add --char-signedness option to change the default char signedness. With the newly added option --char-signedness, pg_resetwal updates the default char signedness flag in the controlfile. This option is primarily intended for an upcoming patch that pg_upgrade supports preserving the d

pgsql: Add test 005_char_signedness.pl to meson.build.

2025-02-21 Thread Masahiko Sawada
Add test 005_char_signedness.pl to meson.build. Oversight in a8238f87f98 where the test has been added. Discussion: https://postgr.es/m/CB11ADBC-0C3F-4FE0-A678-666EE80CBB07%40amazon.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/78d3f48895029e2c7c579fc38c07f2

pgsql: Fix pg_dumpall to cope with dangling OIDs in pg_auth_members.

2025-02-21 Thread Tom Lane
Fix pg_dumpall to cope with dangling OIDs in pg_auth_members. There is a race condition between "GRANT role" and "DROP ROLE", which allows GRANT to install pg_auth_members entries that refer to dropped roles. (Commit 6566133c5 prevented that for the grantor field, but not for the granted or grant

pgsql: Fix an issue with index scan using pg_trgm due to char signednes

2025-02-21 Thread Masahiko Sawada
Fix an issue with index scan using pg_trgm due to char signedness on different architectures. GIN and GiST indexes utilizing pg_trgm's opclasses store sorted trigrams within index tuples. When comparing and sorting each trigram, pg_trgm treats each character as a 'char[3]' type in C. However, the

pgsql: doc: clarify default checksum behavior in non-master branches

2025-02-21 Thread Bruce Momjian
doc: clarify default checksum behavior in non-master branches Also simplify and correct data checksum wording in master now that it is the default. PG 13 did not have the awkward wording. Reported-by: Felix Reviewed-by: Laurenz Albe Discussion: https://postgr.es/m/173928241056.707.398986702

pgsql: Fix pg_dumpall to cope with dangling OIDs in pg_auth_members.

2025-02-21 Thread Tom Lane
Fix pg_dumpall to cope with dangling OIDs in pg_auth_members. There is a race condition between "GRANT role" and "DROP ROLE", which allows GRANT to install pg_auth_members entries that refer to dropped roles. (Commit 6566133c5 prevented that for the grantor field, but not for the granted or grant

pgsql: Fix pg_dumpall to cope with dangling OIDs in pg_auth_members.

2025-02-21 Thread Tom Lane
Fix pg_dumpall to cope with dangling OIDs in pg_auth_members. There is a race condition between "GRANT role" and "DROP ROLE", which allows GRANT to install pg_auth_members entries that refer to dropped roles. (Commit 6566133c5 prevented that for the grantor field, but not for the granted or grant

pgsql: Fix pg_dumpall to cope with dangling OIDs in pg_auth_members.

2025-02-21 Thread Tom Lane
Fix pg_dumpall to cope with dangling OIDs in pg_auth_members. There is a race condition between "GRANT role" and "DROP ROLE", which allows GRANT to install pg_auth_members entries that refer to dropped roles. (Commit 6566133c5 prevented that for the grantor field, but not for the granted or grant

pgsql: Fix pg_dumpall to cope with dangling OIDs in pg_auth_members.

2025-02-21 Thread Tom Lane
Fix pg_dumpall to cope with dangling OIDs in pg_auth_members. There is a race condition between "GRANT role" and "DROP ROLE", which allows GRANT to install pg_auth_members entries that refer to dropped roles. (Commit 6566133c5 prevented that for the grantor field, but not for the granted or grant

pgsql: Fix pg_dumpall to cope with dangling OIDs in pg_auth_members.

2025-02-21 Thread Tom Lane
Fix pg_dumpall to cope with dangling OIDs in pg_auth_members. There is a race condition between "GRANT role" and "DROP ROLE", which allows GRANT to install pg_auth_members entries that refer to dropped roles. (Commit 6566133c5 prevented that for the grantor field, but not for the granted or grant

pgsql: pg_upgrade: Add --set-char-signedness to set the default char si

2025-02-21 Thread Masahiko Sawada
pg_upgrade: Add --set-char-signedness to set the default char signedness of new cluster. This change adds a new option --set-char-signedness to pg_upgrade. It enables user to set arbitrary signedness during pg_upgrade. This helps cases where user who knew they copied the v17 source cluster from x

pgsql: Add default_char_signedness field to ControlFileData.

2025-02-21 Thread Masahiko Sawada
Add default_char_signedness field to ControlFileData. The signedness of the 'char' type in C is implementation-dependent. For instance, 'signed char' is used by default on x86 CPUs, while 'unsigned char' is used on aarch CPUs. Previously, we accidentally let C implementation signedness affect pers

pgsql: doc: clarify default checksum behavior in non-master branches

2025-02-21 Thread Bruce Momjian
doc: clarify default checksum behavior in non-master branches Also simplify and correct data checksum wording in master now that it is the default. PG 13 did not have the awkward wording. Reported-by: Felix Reviewed-by: Laurenz Albe Discussion: https://postgr.es/m/173928241056.707.398986702

pgsql: pg_upgrade: Preserve default char signedness value from old clus

2025-02-21 Thread Masahiko Sawada
pg_upgrade: Preserve default char signedness value from old cluster. Commit 44fe30fdab6 introduced the 'default_char_signedness' field in controlfile. Newly created database clusters always set this field to 'signed'. This change ensures that pg_upgrade updates the 'default_char_signedness' to 'u

pgsql: doc: clarify default checksum behavior in non-master branches

2025-02-21 Thread Bruce Momjian
doc: clarify default checksum behavior in non-master branches Also simplify and correct data checksum wording in master now that it is the default. PG 13 did not have the awkward wording. Reported-by: Felix Reviewed-by: Laurenz Albe Discussion: https://postgr.es/m/173928241056.707.398986702

pgsql: doc: clarify default checksum behavior in non-master branches

2025-02-21 Thread Bruce Momjian
doc: clarify default checksum behavior in non-master branches Also simplify and correct data checksum wording in master now that it is the default. PG 13 did not have the awkward wording. Reported-by: Felix Reviewed-by: Laurenz Albe Discussion: https://postgr.es/m/173928241056.707.398986702

pgsql: doc: clarify default checksum behavior in non-master branches

2025-02-21 Thread Bruce Momjian
doc: clarify default checksum behavior in non-master branches Also simplify and correct data checksum wording in master now that it is the default. PG 13 did not have the awkward wording. Reported-by: Felix Reviewed-by: Laurenz Albe Discussion: https://postgr.es/m/173928241056.707.398986702

pgsql: doc: remove non-breaking space in SGML files, causes make error

2025-02-21 Thread Bruce Momjian
doc: remove non-breaking space in SGML files, causes make error Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6ea0734e41de4f7f39c0df05736c1714aa004b61 Modified Files -- doc/src/sgml/installation.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Make test portlock logic work with meson

2025-02-21 Thread Andres Freund
Make test portlock logic work with meson Previously the portlock logic, added in 9b4eafcaf41, didn't actually work properly when the tests were run via meson. 9b4eafcaf41 used the MESON_BUILD_ROOT environment variable to determine the directory for the port lock directory, but that's never set for

pgsql: Make test portlock logic work with meson

2025-02-21 Thread Andres Freund
Make test portlock logic work with meson Previously the portlock logic, added in 9b4eafcaf41, didn't actually work properly when the tests were run via meson. 9b4eafcaf41 used the MESON_BUILD_ROOT environment variable to determine the directory for the port lock directory, but that's never set for

pgsql: Make test portlock logic work with meson

2025-02-21 Thread Andres Freund
Make test portlock logic work with meson Previously the portlock logic, added in 9b4eafcaf41, didn't actually work properly when the tests were run via meson. 9b4eafcaf41 used the MESON_BUILD_ROOT environment variable to determine the directory for the port lock directory, but that's never set for

Re: pgsql: Transfer statistics during pg_upgrade.

2025-02-21 Thread Andrew Dunstan
On 2025-02-20 Th 4:29 AM, Jeff Davis wrote: Transfer statistics during pg_upgrade. Small nit. I notice this commit has introduced a couple of dubious uses of "mututally exclusive": doc/src/sgml/ref/pg_dump.sgml:    This option is mutually exclusive to --data-only doc/src/sgml/ref/pg

pgsql: Fix cross-version upgrades with XMLSERIALIZE(NO INDENT)

2025-02-21 Thread Michael Paquier
Fix cross-version upgrades with XMLSERIALIZE(NO INDENT) Dumps from versions older than v16 do not know about NO INDENT in a XMLSERIALIZE() clause. This commit adjusts AdjustUpgrade.pm so as NO INDENT is discarded in the contents of the new dump adjusted for comparison when the old version is v15

pgsql: Fix cross-version upgrades with XMLSERIALIZE(NO INDENT)

2025-02-21 Thread Michael Paquier
Fix cross-version upgrades with XMLSERIALIZE(NO INDENT) Dumps from versions older than v16 do not know about NO INDENT in a XMLSERIALIZE() clause. This commit adjusts AdjustUpgrade.pm so as NO INDENT is discarded in the contents of the new dump adjusted for comparison when the old version is v15

pgsql: Fix cross-version upgrades with XMLSERIALIZE(NO INDENT)

2025-02-21 Thread Michael Paquier
Fix cross-version upgrades with XMLSERIALIZE(NO INDENT) Dumps from versions older than v16 do not know about NO INDENT in a XMLSERIALIZE() clause. This commit adjusts AdjustUpgrade.pm so as NO INDENT is discarded in the contents of the new dump adjusted for comparison when the old version is v15

pgsql: Support text position search functions with nondeterministic col

2025-02-21 Thread Peter Eisentraut
Support text position search functions with nondeterministic collations This allows using text position search functions with nondeterministic collations. These functions are - position, strpos - replace - split_part - string_to_array - string_to_table which all use common internal infrastructu

pgsql: Fix a WARNING for data origin discrepancies.

2025-02-21 Thread Amit Kapila
Fix a WARNING for data origin discrepancies. Previously, a WARNING was issued at the time of defining a subscription with origin=NONE only when the publisher subscribed to the same table from other publishers, indicating potential data origination from different origins. However, the publisher can

pgsql: doc: Add links to olsen93 and ong90 in bibliography

2025-02-21 Thread Daniel Gustafsson
doc: Add links to olsen93 and ong90 in bibliography The bibliography entries for olsen93 and ong90 lacked links to online copies. While ong90 is available in digital form, the olsen93 thesis is only available as a physical copy in the UCB library. To save people from searching for it, we still l

pgsql: Fix a WARNING for data origin discrepancies.

2025-02-21 Thread Amit Kapila
Fix a WARNING for data origin discrepancies. Previously, a WARNING was issued at the time of defining a subscription with origin=NONE only when the publisher subscribed to the same table from other publishers, indicating potential data origination from different origins. However, the publisher can

pgsql: Fix a WARNING for data origin discrepancies.

2025-02-21 Thread Amit Kapila
Fix a WARNING for data origin discrepancies. Previously, a WARNING was issued at the time of defining a subscription with origin=NONE only when the publisher subscribed to the same table from other publishers, indicating potential data origination from different origins. However, the publisher can

pgsql: Drop opcintype from index AM strategy translation API

2025-02-21 Thread Peter Eisentraut
Drop opcintype from index AM strategy translation API The type argument wasn't actually really necessary. It was a remnant of converting the API of the gist strategy translation from using opclass to using opfamily+opcintype (commits c09e5a6a016, 622f678c102). For looking up the gist translation

pgsql: Add missing deparsing of [NO] IDENT to XMLSERIALIZE()

2025-02-21 Thread Michael Paquier
Add missing deparsing of [NO] IDENT to XMLSERIALIZE() NO INDENT is the default, and is added if no explicit indentation flag was provided with XMLSERIALIZE(). Oversight in 483bdb2afec9. Author: Jim Jones Discussion: https://postgr.es/m/bebd457e-5b43-46b3-8fc6-f6a650948...@uni-muenster.de Backp

pgsql: Add missing deparsing of [NO] IDENT to XMLSERIALIZE()

2025-02-21 Thread Michael Paquier
Add missing deparsing of [NO] IDENT to XMLSERIALIZE() NO INDENT is the default, and is added if no explicit indentation flag was provided with XMLSERIALIZE(). Oversight in 483bdb2afec9. Author: Jim Jones Discussion: https://postgr.es/m/bebd457e-5b43-46b3-8fc6-f6a650948...@uni-muenster.de Backp

pgsql: Add missing deparsing of [NO] IDENT to XMLSERIALIZE()

2025-02-21 Thread Michael Paquier
Add missing deparsing of [NO] IDENT to XMLSERIALIZE() NO INDENT is the default, and is added if no explicit indentation flag was provided with XMLSERIALIZE(). Oversight in 483bdb2afec9. Author: Jim Jones Discussion: https://postgr.es/m/bebd457e-5b43-46b3-8fc6-f6a650948...@uni-muenster.de Backp