pgsql: Adjust the order of the prechecks in pgrowlocks()

2023-10-30 Thread David Rowley
Adjust the order of the prechecks in pgrowlocks() 4b8266415 added a precheck to pgrowlocks() to ensure the given object's pg_class.relam is HEAP_TABLE_AM_OID, however, that check was put before another check which was checking if the given object was a partitioned table. Since the pg_class.relam

pgsql: Adjust the order of the prechecks in pgrowlocks()

2023-10-30 Thread David Rowley
Adjust the order of the prechecks in pgrowlocks() 4b8266415 added a precheck to pgrowlocks() to ensure the given object's pg_class.relam is HEAP_TABLE_AM_OID, however, that check was put before another check which was checking if the given object was a partitioned table. Since the pg_class.relam

pgsql: Adjust the order of the prechecks in pgrowlocks()

2023-10-30 Thread David Rowley
Adjust the order of the prechecks in pgrowlocks() 4b8266415 added a precheck to pgrowlocks() to ensure the given object's pg_class.relam is HEAP_TABLE_AM_OID, however, that check was put before another check which was checking if the given object was a partitioned table. Since the pg_class.relam

pgsql: Adjust the order of the prechecks in pgrowlocks()

2023-10-30 Thread David Rowley
Adjust the order of the prechecks in pgrowlocks() 4b8266415 added a precheck to pgrowlocks() to ensure the given object's pg_class.relam is HEAP_TABLE_AM_OID, however, that check was put before another check which was checking if the given object was a partitioned table. Since the pg_class.relam

pgsql: Adjust the order of the prechecks in pgrowlocks()

2023-10-30 Thread David Rowley
Adjust the order of the prechecks in pgrowlocks() 4b8266415 added a precheck to pgrowlocks() to ensure the given object's pg_class.relam is HEAP_TABLE_AM_OID, however, that check was put before another check which was checking if the given object was a partitioned table. Since the pg_class.relam

pgsql: Adjust the order of the prechecks in pgrowlocks()

2023-10-30 Thread David Rowley
Adjust the order of the prechecks in pgrowlocks() 4b8266415 added a precheck to pgrowlocks() to ensure the given object's pg_class.relam is HEAP_TABLE_AM_OID, however, that check was put before another check which was checking if the given object was a partitioned table. Since the pg_class.relam

Re: pgsql: Teach contrib/amcheck to check the unique constraint violation

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 02:52:55PM -0400, Bruce Momjian wrote: > Thanks, ran pgindent fix commits de64268561 and 5ae2087202a. Thanks, Bruce. Note that this is a two-step process. Commits done to fix indentation should also be added to .git-blame-ignore-revs. The file has intructions about how t

Re: pgsql: Teach contrib/amcheck to check the unique constraint violation

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 10:35:40AM +0200, Alexander Korotkov wrote: > Fixed, thank you for catching it! Thanks. Note that this is a two-step process, though. Commits done to fix indentation should also be added to .git-blame-ignore-revs. The file has intructions about how to do it. -- Michael

pgsql: Diagnose !indisvalid in more SQL functions.

2023-10-30 Thread Noah Misch
Diagnose !indisvalid in more SQL functions. pgstatindex failed with ERRCODE_DATA_CORRUPTED, of the "can't-happen" class XX. The other functions succeeded on an empty index; they might have malfunctioned if the failed index build left torn I/O or other complex state. Report an ERROR in statistics

pgsql: amcheck: Distinguish interrupted page deletion from corruption.

2023-10-30 Thread Noah Misch
amcheck: Distinguish interrupted page deletion from corruption. This prevents false-positive reports about "the first child of leftmost target page is not leftmost of its level", "block %u is not leftmost" and "left link/right link pair". They appeared if amcheck ran before VACUUM cleaned things,

pgsql: amcheck: Distinguish interrupted page deletion from corruption.

2023-10-30 Thread Noah Misch
amcheck: Distinguish interrupted page deletion from corruption. This prevents false-positive reports about "the first child of leftmost target page is not leftmost of its level", "block %u is not leftmost" and "left link/right link pair". They appeared if amcheck ran before VACUUM cleaned things,

pgsql: Diagnose !indisvalid in more SQL functions.

2023-10-30 Thread Noah Misch
Diagnose !indisvalid in more SQL functions. pgstatindex failed with ERRCODE_DATA_CORRUPTED, of the "can't-happen" class XX. The other functions succeeded on an empty index; they might have malfunctioned if the failed index build left torn I/O or other complex state. Report an ERROR in statistics

pgsql: amcheck: Distinguish interrupted page deletion from corruption.

2023-10-30 Thread Noah Misch
amcheck: Distinguish interrupted page deletion from corruption. This prevents false-positive reports about "the first child of leftmost target page is not leftmost of its level", "block %u is not leftmost" and "left link/right link pair". They appeared if amcheck ran before VACUUM cleaned things,

pgsql: Diagnose !indisvalid in more SQL functions.

2023-10-30 Thread Noah Misch
Diagnose !indisvalid in more SQL functions. pgstatindex failed with ERRCODE_DATA_CORRUPTED, of the "can't-happen" class XX. The other functions succeeded on an empty index; they might have malfunctioned if the failed index build left torn I/O or other complex state. Report an ERROR in statistics

pgsql: Diagnose !indisvalid in more SQL functions.

2023-10-30 Thread Noah Misch
Diagnose !indisvalid in more SQL functions. pgstatindex failed with ERRCODE_DATA_CORRUPTED, of the "can't-happen" class XX. The other functions succeeded on an empty index; they might have malfunctioned if the failed index build left torn I/O or other complex state. Report an ERROR in statistics

pgsql: amcheck: Distinguish interrupted page deletion from corruption.

2023-10-30 Thread Noah Misch
amcheck: Distinguish interrupted page deletion from corruption. This prevents false-positive reports about "the first child of leftmost target page is not leftmost of its level", "block %u is not leftmost" and "left link/right link pair". They appeared if amcheck ran before VACUUM cleaned things,

pgsql: amcheck: Distinguish interrupted page deletion from corruption.

2023-10-30 Thread Noah Misch
amcheck: Distinguish interrupted page deletion from corruption. This prevents false-positive reports about "the first child of leftmost target page is not leftmost of its level", "block %u is not leftmost" and "left link/right link pair". They appeared if amcheck ran before VACUUM cleaned things,

pgsql: Diagnose !indisvalid in more SQL functions.

2023-10-30 Thread Noah Misch
Diagnose !indisvalid in more SQL functions. pgstatindex failed with ERRCODE_DATA_CORRUPTED, of the "can't-happen" class XX. The other functions succeeded on an empty index; they might have malfunctioned if the failed index build left torn I/O or other complex state. Report an ERROR in statistics

pgsql: amcheck: Distinguish interrupted page deletion from corruption.

2023-10-30 Thread Noah Misch
amcheck: Distinguish interrupted page deletion from corruption. This prevents false-positive reports about "the first child of leftmost target page is not leftmost of its level", "block %u is not leftmost" and "left link/right link pair". They appeared if amcheck ran before VACUUM cleaned things,

pgsql: Diagnose !indisvalid in more SQL functions.

2023-10-30 Thread Noah Misch
Diagnose !indisvalid in more SQL functions. pgstatindex failed with ERRCODE_DATA_CORRUPTED, of the "can't-happen" class XX. The other functions succeeded on an empty index; they might have malfunctioned if the failed index build left torn I/O or other complex state. Report an ERROR in statistics

pgsql: amcheck: Distinguish interrupted page deletion from corruption.

2023-10-30 Thread Noah Misch
amcheck: Distinguish interrupted page deletion from corruption. This prevents false-positive reports about "the first child of leftmost target page is not leftmost of its level", "block %u is not leftmost" and "left link/right link pair". They appeared if amcheck ran before VACUUM cleaned things,

pgsql: Diagnose !indisvalid in more SQL functions.

2023-10-30 Thread Noah Misch
Diagnose !indisvalid in more SQL functions. pgstatindex failed with ERRCODE_DATA_CORRUPTED, of the "can't-happen" class XX. The other functions succeeded on an empty index; they might have malfunctioned if the failed index build left torn I/O or other complex state. Report an ERROR in statistics

pgsql: pgindent run to fix commits de64268561 and 5ae2087202a

2023-10-30 Thread Bruce Momjian
pgindent run to fix commits de64268561 and 5ae2087202a Reported-by: Michael Paquier Discussion: https://postgr.es/m/zt9yh7-ttx27v...@paquier.xyz Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/56b30e266eaa74f38bdda45067c9a5a63cd24c75 Mod

Re: pgsql: Teach contrib/amcheck to check the unique constraint violation

2023-10-30 Thread Bruce Momjian
On Mon, Oct 30, 2023 at 04:17:52PM +0900, Michael Paquier wrote: > Hi Alexander, > > On Fri, Oct 27, 2023 at 09:21:50PM +, Alexander Korotkov wrote: > > Teach contrib/amcheck to check the unique constraint violation > > > > Add the 'checkunique' argument to bt_index_check() and > > bt_index_

pgsql: Fill in more of ObjectProperty

2023-10-30 Thread Peter Eisentraut
Fill in more of ObjectProperty Fill in .objtype field where an appropriate value exists. These cases are currently not used (see also comments at get_object_type()), but we might as well fill in what's possible in case additional uses arise. Discussion: https://www.postgresql.org/message-id/fla

pgsql: Add STREAM_START/STREAM_STOP for transactional messages during d

2023-10-30 Thread Amit Kapila
Add STREAM_START/STREAM_STOP for transactional messages during decoding. In test_decoding module, when skip_empty_xacts option was specified, add stream_start/stop for streaming transactional messages. This makes the handling of transactional messages stream consistent irrespective of whether skip

pgsql: Fix indentation in contrib/amcheck/verify_nbtree.c

2023-10-30 Thread Alexander Korotkov
Fix indentation in contrib/amcheck/verify_nbtree.c Reported-by: Michael Paquier Discussion: https://postgr.es/m/ZT9YoDPEQBUMrIHg%40paquier.xyz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/675fed4df5db4e78d40a0ce9cb785cfba9fa480f Modified Files -- con

Re: pgsql: Teach contrib/amcheck to check the unique constraint violation

2023-10-30 Thread Alexander Korotkov
On Mon, Oct 30, 2023 at 9:18 AM Michael Paquier wrote: > On Fri, Oct 27, 2023 at 09:21:50PM +, Alexander Korotkov wrote: > > Teach contrib/amcheck to check the unique constraint violation > > > > Add the 'checkunique' argument to bt_index_check() and > > bt_index_parent_check(). > > When the

pgsql: Expand regression tests for pg_stat_reset_shared()

2023-10-30 Thread Michael Paquier
Expand regression tests for pg_stat_reset_shared() This commit adds coverage for the stats reset of recovery_prefetch, and for the case where an invalid value is given in input of the function. Author: Bharath Rupireddy Discussion: https://postgr.es/m/calj2acw9uk7x61osix9qk0xr4jhy3cgg6pobq-q3gns

Re: pgsql: Teach contrib/amcheck to check the unique constraint violation

2023-10-30 Thread Michael Paquier
Hi Alexander, On Fri, Oct 27, 2023 at 09:21:50PM +, Alexander Korotkov wrote: > Teach contrib/amcheck to check the unique constraint violation > > Add the 'checkunique' argument to bt_index_check() and > bt_index_parent_check(). > When the flag is specified the procedures will check the uniq

Re: pgsql: doc: comment wording improvement

2023-10-30 Thread Michael Paquier
Hi Bruce, On Sat, Oct 28, 2023 at 04:59:03PM +, Bruce Momjian wrote: > doc: comment wording improvement > > Discussion: > https://postgr.es/m/CAEG8a3L7UoZXH1VmzpV-VDkex2kt68nWKuW1WiohoT=rrzy...@mail.gmail.com > > Author: Junwang Zhao > > Backpatch-through: master Note that koel is unhapp