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 suppor

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 becau

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 becau

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 Deta

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 -- REL_16_STABL

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 I

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 I

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 I

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 I

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 I

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 I

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 checkpoint_t

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: https://postgr.es/m/20240211010227.a2.nmi

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 checkpoint_t

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: https://postgr.es/m/20240211010227.a2.nmi

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 --- https://git.postgresql.org/pg/commitdiff/f2c7a6ea8bb

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 --- https://git.postgresql.org/pg/commitdiff/eac4aff0b8a

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 --- https://git.postgresql.org/pg/commitdiff/94d7250ac42

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 --- https://git.postgresql.org/pg/commitdiff/517010bd499

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 --- https://git.postgresql.org/pg/commitdiff/7f2718532401cfcf5a

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 --- https://git.postgresql.org/pg/commitdiff/6257ebf1e33

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&dt=2024-02-15%2021%3A58%3A04 Reported-by: Andrei Lepikhov Discussion: https://postgr.es/m/250c4cec-e459-4311-8fd6-da255

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 ---