pgsql: Minor corrections for partition pruning

2024-02-19 Thread David Rowley
Minor corrections for partition pruning When the partition pruning code finds an OpExpr with an operator that does not belong to the partition key's opfamily, the code checks to see if the negator of the operator is the opfamily's BTEqualStrategyNumber operator so that partition pruning can

pgsql: Fix race leading to incorrect conflict cause in InvalidatePossib

2024-02-19 Thread Michael Paquier
Fix race leading to incorrect conflict cause in InvalidatePossiblyObsoleteSlot() The invalidation of an active slot is done in two steps: - Termination of the backend holding it, if any. - Report that the slot is obsolete, with a conflict cause depending on the slot's data. This can be racy

pgsql: Fix race leading to incorrect conflict cause in InvalidatePossib

2024-02-19 Thread Michael Paquier
Fix race leading to incorrect conflict cause in InvalidatePossiblyObsoleteSlot() The invalidation of an active slot is done in two steps: - Termination of the backend holding it, if any. - Report that the slot is obsolete, with a conflict cause depending on the slot's data. This can be racy

pgsql: doc: Use system-username instead of system-user

2024-02-19 Thread Michael Paquier
doc: Use system-username instead of system-user This inconsistency has been introduced in efb6f4a4f9b6. Reported-by: Julien Rouhaud Author: Bertrand Drouvot Discussion: https://postgr.es/m/zdmwux1hpiebk...@ip-10-97-1-34.eu-west-3.compute.internal Backpatch-through: 16 Branch -- master

pgsql: doc: Use system-username instead of system-user

2024-02-19 Thread Michael Paquier
doc: Use system-username instead of system-user This inconsistency has been introduced in efb6f4a4f9b6. Reported-by: Julien Rouhaud Author: Bertrand Drouvot Discussion: https://postgr.es/m/zdmwux1hpiebk...@ip-10-97-1-34.eu-west-3.compute.internal Backpatch-through: 16 Branch --

pgsql: Fix incorrect pruning of NULL partition for boolean IS NOT claus

2024-02-19 Thread David Rowley
Fix incorrect pruning of NULL partition for boolean IS NOT clauses Partition pruning wrongly assumed that, for a table partitioned on a boolean column, a clause in the form "boolcol IS NOT false" and "boolcol IS NOT true" could be inverted to correspondingly become "boolcol IS true" and "boolcol

pgsql: Fix incorrect pruning of NULL partition for boolean IS NOT claus

2024-02-19 Thread David Rowley
Fix incorrect pruning of NULL partition for boolean IS NOT clauses Partition pruning wrongly assumed that, for a table partitioned on a boolean column, a clause in the form "boolcol IS NOT false" and "boolcol IS NOT true" could be inverted to correspondingly become "boolcol IS true" and "boolcol

pgsql: Fix incorrect pruning of NULL partition for boolean IS NOT claus

2024-02-19 Thread David Rowley
Fix incorrect pruning of NULL partition for boolean IS NOT clauses Partition pruning wrongly assumed that, for a table partitioned on a boolean column, a clause in the form "boolcol IS NOT false" and "boolcol IS NOT true" could be inverted to correspondingly become "boolcol IS true" and "boolcol

pgsql: Fix incorrect pruning of NULL partition for boolean IS NOT claus

2024-02-19 Thread David Rowley
Fix incorrect pruning of NULL partition for boolean IS NOT clauses Partition pruning wrongly assumed that, for a table partitioned on a boolean column, a clause in the form "boolcol IS NOT false" and "boolcol IS NOT true" could be inverted to correspondingly become "boolcol IS true" and "boolcol

pgsql: Fix incorrect pruning of NULL partition for boolean IS NOT claus

2024-02-19 Thread David Rowley
Fix incorrect pruning of NULL partition for boolean IS NOT clauses Partition pruning wrongly assumed that, for a table partitioned on a boolean column, a clause in the form "boolcol IS NOT false" and "boolcol IS NOT true" could be inverted to correspondingly become "boolcol IS true" and "boolcol

pgsql: Fix incorrect pruning of NULL partition for boolean IS NOT claus

2024-02-19 Thread David Rowley
Fix incorrect pruning of NULL partition for boolean IS NOT clauses Partition pruning wrongly assumed that, for a table partitioned on a boolean column, a clause in the form "boolcol IS NOT false" and "boolcol IS NOT true" could be inverted to correspondingly become "boolcol IS true" and "boolcol

pgsql: Fix test race between primary XLOG_RUNNING_XACTS and standby log

2024-02-19 Thread Noah Misch
Fix test race between primary XLOG_RUNNING_XACTS and standby logical slot. Before the previous commit, the test could hang until LOG_SNAPSHOT_INTERVAL_MS (15s), until checkpoint_timeout (300s), or indefinitely. An indefinite hang was awfully improbable. It entailed the test reaching

pgsql: Bound waits in 035_standby_logical_decoding.pl.

2024-02-19 Thread Noah Misch
Bound waits in 035_standby_logical_decoding.pl. One IPC::Run::start() used an IPC::Run::timer() without checking for expiration. The other used no timeout or timer. Back-patch to v16, which introduced the test. Reviewed by Bertrand Drouvot. Discussion:

pgsql: Fix test race between primary XLOG_RUNNING_XACTS and standby log

2024-02-19 Thread Noah Misch
Fix test race between primary XLOG_RUNNING_XACTS and standby logical slot. Before the previous commit, the test could hang until LOG_SNAPSHOT_INTERVAL_MS (15s), until checkpoint_timeout (300s), or indefinitely. An indefinite hang was awfully improbable. It entailed the test reaching

pgsql: Bound waits in 035_standby_logical_decoding.pl.

2024-02-19 Thread Noah Misch
Bound waits in 035_standby_logical_decoding.pl. One IPC::Run::start() used an IPC::Run::timer() without checking for expiration. The other used no timeout or timer. Back-patch to v16, which introduced the test. Reviewed by Bertrand Drouvot. Discussion:

pgsql: Doc: fix typo in SECURITY LABEL synopsis.

2024-02-19 Thread Tom Lane
Doc: fix typo in SECURITY LABEL synopsis. One case missed its trailing "|". Reported by Tim Needham. Discussion: https://postgr.es/m/170833547220.3279712.700702770281879...@wrigleys.postgresql.org Branch -- REL_12_STABLE Details ---

pgsql: Doc: fix typo in SECURITY LABEL synopsis.

2024-02-19 Thread Tom Lane
Doc: fix typo in SECURITY LABEL synopsis. One case missed its trailing "|". Reported by Tim Needham. Discussion: https://postgr.es/m/170833547220.3279712.700702770281879...@wrigleys.postgresql.org Branch -- REL_14_STABLE Details ---

pgsql: Doc: fix typo in SECURITY LABEL synopsis.

2024-02-19 Thread Tom Lane
Doc: fix typo in SECURITY LABEL synopsis. One case missed its trailing "|". Reported by Tim Needham. Discussion: https://postgr.es/m/170833547220.3279712.700702770281879...@wrigleys.postgresql.org Branch -- REL_13_STABLE Details ---

pgsql: Doc: fix typo in SECURITY LABEL synopsis.

2024-02-19 Thread Tom Lane
Doc: fix typo in SECURITY LABEL synopsis. One case missed its trailing "|". Reported by Tim Needham. Discussion: https://postgr.es/m/170833547220.3279712.700702770281879...@wrigleys.postgresql.org Branch -- REL_15_STABLE Details ---

pgsql: Doc: fix typo in SECURITY LABEL synopsis.

2024-02-19 Thread Tom Lane
Doc: fix typo in SECURITY LABEL synopsis. One case missed its trailing "|". Reported by Tim Needham. Discussion: https://postgr.es/m/170833547220.3279712.700702770281879...@wrigleys.postgresql.org Branch -- master Details ---

pgsql: Doc: fix typo in SECURITY LABEL synopsis.

2024-02-19 Thread Tom Lane
Doc: fix typo in SECURITY LABEL synopsis. One case missed its trailing "|". Reported by Tim Needham. Discussion: https://postgr.es/m/170833547220.3279712.700702770281879...@wrigleys.postgresql.org Branch -- REL_16_STABLE Details ---

pgsql: Get rid of pg_class usage in SJE regression tests

2024-02-19 Thread Alexander Korotkov
Get rid of pg_class usage in SJE regression tests Usage of pg_class led to instability, see the buildfarm failure. https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion=2024-02-15%2021%3A58%3A04 Reported-by: Andrei Lepikhov Discussion:

pgsql: ci: Add test coverage of different pg_upgrade modes

2024-02-19 Thread Peter Eisentraut
ci: Add test coverage of different pg_upgrade modes Run freebsd with --link and macos with --clone, to get some coverage of the non-default modes. Author: Justin Pryzby Discussion: https://www.postgresql.org/message-id/flat/20220528153741.gk19...@telsasoft.com Branch -- master Details