pgsql: SQL/JSON: Prevent ON EMPTY for EXISTS columns in JSON_TABLE()

2024-06-27 Thread Amit Langote
SQL/JSON: Prevent ON EMPTY for EXISTS columns in JSON_TABLE() Due to an oversight in de3600452b61, the ON EMPTY clause was incorrectly allowed in the EXISTS column. Fix the grammar to prevent this. Discussion: https://postgr.es/m/CA%2BHiwqHh3YDXTpccgAo4CdfV9Mhy%2Bmg%3Doh6t8rfM5uLW1BJN4g%40mail.g

pgsql: SQL/JSON: Validate values in ON ERROR/EMPTY clauses

2024-06-27 Thread Amit Langote
SQL/JSON: Validate values in ON ERROR/EMPTY clauses Currently, the grammar allows any supported values in the ON ERROR and ON EMPTY clauses for SQL/JSON functions, regardless of whether the values are appropriate for the function. This commit ensures that during parse analysis, the provided value

pgsql: Update modules/injection_points/.gitignore

2024-06-27 Thread Michael Paquier
Update modules/injection_points/.gitignore Thinko in c35f419d6efb, where an isolation test has been added to the module. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0ad8153c1f4c7129ff19e8a41d142001d35c8514 Modified Files -- src/test/modules/injectio

pgsql: Fix comments in heaptuple.c

2024-06-27 Thread Michael Paquier
Fix comments in heaptuple.c Since e27f4ee0a701, fastgetattr() and heap_getattr() are not macros, but inlined functions. Author: Junwang Zhao Reviewed-by: Stepan Neretin Discussion: https://postgr.es/m/CAEG8a3JS-JKWWyOcM7BU=vPqFXa3W7mZSHnvc3CBqx=tc+3...@mail.gmail.com Branch -- master Detai

pgsql: Improve locking around InjectionPointRun()

2024-06-27 Thread Michael Paquier
Improve locking around InjectionPointRun() As coded, an injection point could be loaded into the local cache without the LWLock InjectionPointLock taken, hence a point detached and re-attached concurrently of a point running calling InjectionPointRun() may finish by loading a callback it did no se

pgsql: AccessExclusiveLock new relations just after assigning the OID.

2024-06-27 Thread Noah Misch
AccessExclusiveLock new relations just after assigning the OID. This has no user-visible, important consequences, since other sessions' catalog scans can't find the relation until we commit. However, this unblocks introducing a rule about locks required to heap_update() a pg_class row. CREATE TA

pgsql: Cope with inplace update making catcache stale during TOAST fetc

2024-06-27 Thread Noah Misch
Cope with inplace update making catcache stale during TOAST fetch. This extends ad98fb14226ae6456fbaed7990ee7591cbe5efd2 to invals of inplace updates. Trouble requires an inplace update of a catalog having a TOAST table, so only pg_database was at risk. (The other catalog on which core code perf

pgsql: Make TAP todo_start effects the same under Meson and prove_check

2024-06-27 Thread Noah Misch
Make TAP todo_start effects the same under Meson and prove_check. This could have caused spurious failures only on SPARC Linux, because today's only todo_start tests for that platform. Back-patch to v16, where Meson support first appeared. Reviewed by Robert Haas. Discussion: https://postgr.es/

pgsql: Cope with inplace update making catcache stale during TOAST fetc

2024-06-27 Thread Noah Misch
Cope with inplace update making catcache stale during TOAST fetch. This extends ad98fb14226ae6456fbaed7990ee7591cbe5efd2 to invals of inplace updates. Trouble requires an inplace update of a catalog having a TOAST table, so only pg_database was at risk. (The other catalog on which core code perf

pgsql: Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX.

2024-06-27 Thread Noah Misch
Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX. Commit 5b562644fec696977df4a82790064e8287927891 added a comment that SetRelationHasSubclass() callers must hold this lock. When commit 17f206fbc824d2b4b14480199ca9ff7dea417eda extended use of this column to partitioned indexes, it d

pgsql: Lock owned sequences during ALTER TABLE SET { LOGGED | UNLOGGED

2024-06-27 Thread Noah Misch
Lock owned sequences during ALTER TABLE SET { LOGGED | UNLOGGED }. These commands already make the persistence of owned sequences follow owned table persistence changes. They didn't lock those sequences. They lost the effect of nextval() calls that other sessions make after the ALTER TABLE comman

pgsql: Improve test coverage for changes to inplace-updated catalogs.

2024-06-27 Thread Noah Misch
Improve test coverage for changes to inplace-updated catalogs. This covers both regular and inplace changes, since bugs arise at their intersection. Where marked, these witness extant bugs. Back-patch to v12 (all supported versions). Reviewed (in an earlier version) by Robert Haas. Discussion:

pgsql: Remove comment about xl_heap_inplace "AT END OF STRUCT".

2024-06-27 Thread Noah Misch
Remove comment about xl_heap_inplace "AT END OF STRUCT". Commit 2c03216d831160bedd72d45f712601b6f7d03f1c moved the tuple data from there to the buffer-0 data. Back-patch to v12 (all supported versions), the plan for the next change to this struct. Discussion: https://postgr.es/m/20240523000548.5

pgsql: Remove comment about xl_heap_inplace "AT END OF STRUCT".

2024-06-27 Thread Noah Misch
Remove comment about xl_heap_inplace "AT END OF STRUCT". Commit 2c03216d831160bedd72d45f712601b6f7d03f1c moved the tuple data from there to the buffer-0 data. Back-patch to v12 (all supported versions), the plan for the next change to this struct. Discussion: https://postgr.es/m/20240523000548.5

pgsql: Cope with inplace update making catcache stale during TOAST fetc

2024-06-27 Thread Noah Misch
Cope with inplace update making catcache stale during TOAST fetch. This extends ad98fb14226ae6456fbaed7990ee7591cbe5efd2 to invals of inplace updates. Trouble requires an inplace update of a catalog having a TOAST table, so only pg_database was at risk. (The other catalog on which core code perf

pgsql: Improve test coverage for changes to inplace-updated catalogs.

2024-06-27 Thread Noah Misch
Improve test coverage for changes to inplace-updated catalogs. This covers both regular and inplace changes, since bugs arise at their intersection. Where marked, these witness extant bugs. Back-patch to v12 (all supported versions). Reviewed (in an earlier version) by Robert Haas. Discussion:

pgsql: Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX.

2024-06-27 Thread Noah Misch
Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX. Commit 5b562644fec696977df4a82790064e8287927891 added a comment that SetRelationHasSubclass() callers must hold this lock. When commit 17f206fbc824d2b4b14480199ca9ff7dea417eda extended use of this column to partitioned indexes, it d

pgsql: AccessExclusiveLock new relations just after assigning the OID.

2024-06-27 Thread Noah Misch
AccessExclusiveLock new relations just after assigning the OID. This has no user-visible, important consequences, since other sessions' catalog scans can't find the relation until we commit. However, this unblocks introducing a rule about locks required to heap_update() a pg_class row. CREATE TA

pgsql: Expand comments and add an assertion in nodeModifyTable.c.

2024-06-27 Thread Noah Misch
Expand comments and add an assertion in nodeModifyTable.c. Most comments concern RELKIND_VIEW. One addresses the ExecUpdate() "tupleid" parameter. A later commit will rely on these facts, but they hold already. Back-patch to v12 (all supported versions), the plan for that commit. Reviewed (in

pgsql: Make TAP todo_start effects the same under Meson and prove_check

2024-06-27 Thread Noah Misch
Make TAP todo_start effects the same under Meson and prove_check. This could have caused spurious failures only on SPARC Linux, because today's only todo_start tests for that platform. Back-patch to v16, where Meson support first appeared. Reviewed by Robert Haas. Discussion: https://postgr.es/

pgsql: Expand comments and add an assertion in nodeModifyTable.c.

2024-06-27 Thread Noah Misch
Expand comments and add an assertion in nodeModifyTable.c. Most comments concern RELKIND_VIEW. One addresses the ExecUpdate() "tupleid" parameter. A later commit will rely on these facts, but they hold already. Back-patch to v12 (all supported versions), the plan for that commit. Reviewed (in

pgsql: Expand comments and add an assertion in nodeModifyTable.c.

2024-06-27 Thread Noah Misch
Expand comments and add an assertion in nodeModifyTable.c. Most comments concern RELKIND_VIEW. One addresses the ExecUpdate() "tupleid" parameter. A later commit will rely on these facts, but they hold already. Back-patch to v12 (all supported versions), the plan for that commit. Reviewed (in

pgsql: Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX.

2024-06-27 Thread Noah Misch
Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX. Commit 5b562644fec696977df4a82790064e8287927891 added a comment that SetRelationHasSubclass() callers must hold this lock. When commit 17f206fbc824d2b4b14480199ca9ff7dea417eda extended use of this column to partitioned indexes, it d

pgsql: Improve test coverage for changes to inplace-updated catalogs.

2024-06-27 Thread Noah Misch
Improve test coverage for changes to inplace-updated catalogs. This covers both regular and inplace changes, since bugs arise at their intersection. Where marked, these witness extant bugs. Back-patch to v12 (all supported versions). Reviewed (in an earlier version) by Robert Haas. Discussion:

pgsql: AccessExclusiveLock new relations just after assigning the OID.

2024-06-27 Thread Noah Misch
AccessExclusiveLock new relations just after assigning the OID. This has no user-visible, important consequences, since other sessions' catalog scans can't find the relation until we commit. However, this unblocks introducing a rule about locks required to heap_update() a pg_class row. CREATE TA

pgsql: Remove comment about xl_heap_inplace "AT END OF STRUCT".

2024-06-27 Thread Noah Misch
Remove comment about xl_heap_inplace "AT END OF STRUCT". Commit 2c03216d831160bedd72d45f712601b6f7d03f1c moved the tuple data from there to the buffer-0 data. Back-patch to v12 (all supported versions), the plan for the next change to this struct. Discussion: https://postgr.es/m/20240523000548.5

pgsql: Lock owned sequences during ALTER TABLE SET { LOGGED | UNLOGGED

2024-06-27 Thread Noah Misch
Lock owned sequences during ALTER TABLE SET { LOGGED | UNLOGGED }. These commands already make the persistence of owned sequences follow owned table persistence changes. They didn't lock those sequences. They lost the effect of nextval() calls that other sessions make after the ALTER TABLE comman

pgsql: Expand comments and add an assertion in nodeModifyTable.c.

2024-06-27 Thread Noah Misch
Expand comments and add an assertion in nodeModifyTable.c. Most comments concern RELKIND_VIEW. One addresses the ExecUpdate() "tupleid" parameter. A later commit will rely on these facts, but they hold already. Back-patch to v12 (all supported versions), the plan for that commit. Reviewed (in

pgsql: Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX.

2024-06-27 Thread Noah Misch
Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX. Commit 5b562644fec696977df4a82790064e8287927891 added a comment that SetRelationHasSubclass() callers must hold this lock. When commit 17f206fbc824d2b4b14480199ca9ff7dea417eda extended use of this column to partitioned indexes, it d

pgsql: Lock owned sequences during ALTER TABLE SET { LOGGED | UNLOGGED

2024-06-27 Thread Noah Misch
Lock owned sequences during ALTER TABLE SET { LOGGED | UNLOGGED }. These commands already make the persistence of owned sequences follow owned table persistence changes. They didn't lock those sequences. They lost the effect of nextval() calls that other sessions make after the ALTER TABLE comman

pgsql: Remove comment about xl_heap_inplace "AT END OF STRUCT".

2024-06-27 Thread Noah Misch
Remove comment about xl_heap_inplace "AT END OF STRUCT". Commit 2c03216d831160bedd72d45f712601b6f7d03f1c moved the tuple data from there to the buffer-0 data. Back-patch to v12 (all supported versions), the plan for the next change to this struct. Discussion: https://postgr.es/m/20240523000548.5

pgsql: Improve test coverage for changes to inplace-updated catalogs.

2024-06-27 Thread Noah Misch
Improve test coverage for changes to inplace-updated catalogs. This covers both regular and inplace changes, since bugs arise at their intersection. Where marked, these witness extant bugs. Back-patch to v12 (all supported versions). Reviewed (in an earlier version) by Robert Haas. Discussion:

pgsql: AccessExclusiveLock new relations just after assigning the OID.

2024-06-27 Thread Noah Misch
AccessExclusiveLock new relations just after assigning the OID. This has no user-visible, important consequences, since other sessions' catalog scans can't find the relation until we commit. However, this unblocks introducing a rule about locks required to heap_update() a pg_class row. CREATE TA

pgsql: Improve test coverage for changes to inplace-updated catalogs.

2024-06-27 Thread Noah Misch
Improve test coverage for changes to inplace-updated catalogs. This covers both regular and inplace changes, since bugs arise at their intersection. Where marked, these witness extant bugs. Back-patch to v12 (all supported versions). Reviewed (in an earlier version) by Robert Haas. Discussion:

pgsql: Expand comments and add an assertion in nodeModifyTable.c.

2024-06-27 Thread Noah Misch
Expand comments and add an assertion in nodeModifyTable.c. Most comments concern RELKIND_VIEW. One addresses the ExecUpdate() "tupleid" parameter. A later commit will rely on these facts, but they hold already. Back-patch to v12 (all supported versions), the plan for that commit. Reviewed (in

pgsql: Cope with inplace update making catcache stale during TOAST fetc

2024-06-27 Thread Noah Misch
Cope with inplace update making catcache stale during TOAST fetch. This extends ad98fb14226ae6456fbaed7990ee7591cbe5efd2 to invals of inplace updates. Trouble requires an inplace update of a catalog having a TOAST table, so only pg_database was at risk. (The other catalog on which core code perf

pgsql: AccessExclusiveLock new relations just after assigning the OID.

2024-06-27 Thread Noah Misch
AccessExclusiveLock new relations just after assigning the OID. This has no user-visible, important consequences, since other sessions' catalog scans can't find the relation until we commit. However, this unblocks introducing a rule about locks required to heap_update() a pg_class row. CREATE TA

pgsql: AccessExclusiveLock new relations just after assigning the OID.

2024-06-27 Thread Noah Misch
AccessExclusiveLock new relations just after assigning the OID. This has no user-visible, important consequences, since other sessions' catalog scans can't find the relation until we commit. However, this unblocks introducing a rule about locks required to heap_update() a pg_class row. CREATE TA

pgsql: Expand comments and add an assertion in nodeModifyTable.c.

2024-06-27 Thread Noah Misch
Expand comments and add an assertion in nodeModifyTable.c. Most comments concern RELKIND_VIEW. One addresses the ExecUpdate() "tupleid" parameter. A later commit will rely on these facts, but they hold already. Back-patch to v12 (all supported versions), the plan for that commit. Reviewed (in

pgsql: Improve test coverage for changes to inplace-updated catalogs.

2024-06-27 Thread Noah Misch
Improve test coverage for changes to inplace-updated catalogs. This covers both regular and inplace changes, since bugs arise at their intersection. Where marked, these witness extant bugs. Back-patch to v12 (all supported versions). Reviewed (in an earlier version) by Robert Haas. Discussion:

pgsql: Cope with inplace update making catcache stale during TOAST fetc

2024-06-27 Thread Noah Misch
Cope with inplace update making catcache stale during TOAST fetch. This extends ad98fb14226ae6456fbaed7990ee7591cbe5efd2 to invals of inplace updates. Trouble requires an inplace update of a catalog having a TOAST table, so only pg_database was at risk. (The other catalog on which core code perf

pgsql: Remove comment about xl_heap_inplace "AT END OF STRUCT".

2024-06-27 Thread Noah Misch
Remove comment about xl_heap_inplace "AT END OF STRUCT". Commit 2c03216d831160bedd72d45f712601b6f7d03f1c moved the tuple data from there to the buffer-0 data. Back-patch to v12 (all supported versions), the plan for the next change to this struct. Discussion: https://postgr.es/m/20240523000548.5

pgsql: Cope with inplace update making catcache stale during TOAST fetc

2024-06-27 Thread Noah Misch
Cope with inplace update making catcache stale during TOAST fetch. This extends ad98fb14226ae6456fbaed7990ee7591cbe5efd2 to invals of inplace updates. Trouble requires an inplace update of a catalog having a TOAST table, so only pg_database was at risk. (The other catalog on which core code perf

pgsql: Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX.

2024-06-27 Thread Noah Misch
Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX. Commit 5b562644fec696977df4a82790064e8287927891 added a comment that SetRelationHasSubclass() callers must hold this lock. When commit 17f206fbc824d2b4b14480199ca9ff7dea417eda extended use of this column to partitioned indexes, it d

pgsql: Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX.

2024-06-27 Thread Noah Misch
Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX. Commit 5b562644fec696977df4a82790064e8287927891 added a comment that SetRelationHasSubclass() callers must hold this lock. When commit 17f206fbc824d2b4b14480199ca9ff7dea417eda extended use of this column to partitioned indexes, it d

pgsql: Create waitfuncs.c for pg_isolation_test_session_is_blocked().

2024-06-27 Thread Noah Misch
Create waitfuncs.c for pg_isolation_test_session_is_blocked(). The next commit makes the function inspect an additional non-lock contention source, so it no longer fits in lockfuncs.c. Reviewed by Robert Haas. Discussion: https://postgr.es/m/20240512232923.aa.nmi...@google.com Branch -- mas

pgsql: Remove comment about xl_heap_inplace "AT END OF STRUCT".

2024-06-27 Thread Noah Misch
Remove comment about xl_heap_inplace "AT END OF STRUCT". Commit 2c03216d831160bedd72d45f712601b6f7d03f1c moved the tuple data from there to the buffer-0 data. Back-patch to v12 (all supported versions), the plan for the next change to this struct. Discussion: https://postgr.es/m/20240523000548.5

pgsql: Add an injection_points isolation test suite.

2024-06-27 Thread Noah Misch
Add an injection_points isolation test suite. Make the isolation harness recognize injection_points wait events as a type of blocked state. Test an extant inplace-update bug. Reviewed by Robert Haas and Michael Paquier. Discussion: https://postgr.es/m/20240512232923.aa.nmi...@google.com Branch

pgsql: Add wait event type "InjectionPoint", a custom type like "Extens

2024-06-27 Thread Noah Misch
Add wait event type "InjectionPoint", a custom type like "Extension". Both injection points and customization of type "Extension" are new in v17, so this just changes a detail of an unreleased feature. Reported by Robert Haas. Reviewed by Michael Paquier. Discussion: https://postgr.es/m/ca+tgm

pgsql: SQL/JSON: Document behavior when input document is not jsonb

2024-06-27 Thread Amit Langote
SQL/JSON: Document behavior when input document is not jsonb The input document to functions JSON_EXISTS(), JSON_QUERY(), JSON_VALUE(), and JSON_TABLE() can be specified as character or UTF8-encoded bytea strings. These are automatically converted to jsonb with an implicit cast before being passed

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Avoid crashing when a JIT-inlined backend function throws an err

2024-06-27 Thread Tom Lane
Avoid crashing when a JIT-inlined backend function throws an error. errfinish() assumes that the __FUNC__ and __FILE__ arguments it's passed are compile-time constant strings that can just be pointed to rather than physically copied. However, it's possible for LLVM to generate code in which those

pgsql: Fix MVCC bug with prepared xact with subxacts on standby

2024-06-27 Thread Heikki Linnakangas
Fix MVCC bug with prepared xact with subxacts on standby We did not recover the subtransaction IDs of prepared transactions when starting a hot standby from a shutdown checkpoint. As a result, such subtransactions were considered as aborted, rather than in-progress. That would lead to hint bits be

pgsql: tests: Trim newline from result returned by BackgroundPsql->quer

2024-06-27 Thread Heikki Linnakangas
tests: Trim newline from result returned by BackgroundPsql->query This went unnoticed, because only a few existing callers of BackgroundPsql->query used the result, and the ones that did were not bothered by an extra newline. I noticed because I was about to add a new test that checks the result.

pgsql: tests: Trim newline from result returned by BackgroundPsql->quer

2024-06-27 Thread Heikki Linnakangas
tests: Trim newline from result returned by BackgroundPsql->query This went unnoticed, because only a few existing callers of BackgroundPsql->query used the result, and the ones that did were not bothered by an extra newline. I noticed because I was about to add a new test that checks the result.

pgsql: Fix MVCC bug with prepared xact with subxacts on standby

2024-06-27 Thread Heikki Linnakangas
Fix MVCC bug with prepared xact with subxacts on standby We did not recover the subtransaction IDs of prepared transactions when starting a hot standby from a shutdown checkpoint. As a result, such subtransactions were considered as aborted, rather than in-progress. That would lead to hint bits be

pgsql: tests: Trim newline from result returned by BackgroundPsql->quer

2024-06-27 Thread Heikki Linnakangas
tests: Trim newline from result returned by BackgroundPsql->query This went unnoticed, because only a few existing callers of BackgroundPsql->query used the result, and the ones that did were not bothered by an extra newline. I noticed because I was about to add a new test that checks the result.

pgsql: Fix MVCC bug with prepared xact with subxacts on standby

2024-06-27 Thread Heikki Linnakangas
Fix MVCC bug with prepared xact with subxacts on standby We did not recover the subtransaction IDs of prepared transactions when starting a hot standby from a shutdown checkpoint. As a result, such subtransactions were considered as aborted, rather than in-progress. That would lead to hint bits be

pgsql: tests: Trim newline from result returned by BackgroundPsql->quer

2024-06-27 Thread Heikki Linnakangas
tests: Trim newline from result returned by BackgroundPsql->query This went unnoticed, because only a few existing callers of BackgroundPsql->query used the result, and the ones that did were not bothered by an extra newline. I noticed because I was about to add a new test that checks the result.

pgsql: Fix MVCC bug with prepared xact with subxacts on standby

2024-06-27 Thread Heikki Linnakangas
Fix MVCC bug with prepared xact with subxacts on standby We did not recover the subtransaction IDs of prepared transactions when starting a hot standby from a shutdown checkpoint. As a result, such subtransactions were considered as aborted, rather than in-progress. That would lead to hint bits be

pgsql: tests: Trim newline from result returned by BackgroundPsql->quer

2024-06-27 Thread Heikki Linnakangas
tests: Trim newline from result returned by BackgroundPsql->query This went unnoticed, because only a few existing callers of BackgroundPsql->query used the result, and the ones that did were not bothered by an extra newline. I noticed because I was about to add a new test that checks the result.

pgsql: Fix MVCC bug with prepared xact with subxacts on standby

2024-06-27 Thread Heikki Linnakangas
Fix MVCC bug with prepared xact with subxacts on standby We did not recover the subtransaction IDs of prepared transactions when starting a hot standby from a shutdown checkpoint. As a result, such subtransactions were considered as aborted, rather than in-progress. That would lead to hint bits be

pgsql: Fix MVCC bug with prepared xact with subxacts on standby

2024-06-27 Thread Heikki Linnakangas
Fix MVCC bug with prepared xact with subxacts on standby We did not recover the subtransaction IDs of prepared transactions when starting a hot standby from a shutdown checkpoint. As a result, such subtransactions were considered as aborted, rather than in-progress. That would lead to hint bits be

pgsql: tests: Trim newline from result returned by BackgroundPsql->quer

2024-06-27 Thread Heikki Linnakangas
tests: Trim newline from result returned by BackgroundPsql->query This went unnoticed, because only a few existing callers of BackgroundPsql->query used the result, and the ones that did were not bothered by an extra newline. I noticed because I was about to add a new test that checks the result.

pgsql: Fix thinkos in comments

2024-06-27 Thread Alvaro Herrera
Fix thinkos in comments The first one was noticed by Tender Wang and introduced with 8aba9322511f; the other one was newly introduced with dbca3469ebf8. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5fcd0d0ce1e5f2abe6b3e9d6f05e439d3088a538 Modified Files -

pgsql: Fix thinkos in comments

2024-06-27 Thread Alvaro Herrera
Fix thinkos in comments The first one was noticed by Tender Wang and introduced with 8aba9322511f; the other one was newly introduced with dbca3469ebf8. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a2dff271ebe2a0547d46e90dcb02c088cf2f031c Modified Files

pgsql: Fix thinkos in comments

2024-06-27 Thread Alvaro Herrera
Fix thinkos in comments The first one was noticed by Tender Wang and introduced with 8aba9322511f; the other one was newly introduced with dbca3469ebf8. Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/79228c0459817cfbf830395c77735d8f3bce3f47 Modified Files -

pgsql: Fix thinkos in comments

2024-06-27 Thread Alvaro Herrera
Fix thinkos in comments The first one was noticed by Tender Wang and introduced with 8aba9322511f; the other one was newly introduced with dbca3469ebf8. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/468ffee47bcb9c8b7b4f7b3168aef804a3ad802c Modified Files -

pgsql: Backport BackgroundPsql perl test module

2024-06-27 Thread Heikki Linnakangas
Backport BackgroundPsql perl test module Backport the new BackgroundPsql modules and the constructor functions, background_psql() and interactive_psql, to all supported branches. That makes it easier to backpatch tests that use it. BackgroundPsql was introduced in version 16. On version 16, this

pgsql: Backport BackgroundPsql perl test module

2024-06-27 Thread Heikki Linnakangas
Backport BackgroundPsql perl test module Backport the new BackgroundPsql modules and the constructor functions, background_psql() and interactive_psql, to all supported branches. That makes it easier to backpatch tests that use it. BackgroundPsql was introduced in version 16. On version 16, this

pgsql: Backport BackgroundPsql perl test module

2024-06-27 Thread Heikki Linnakangas
Backport BackgroundPsql perl test module Backport the new BackgroundPsql modules and the constructor functions, background_psql() and interactive_psql, to all supported branches. That makes it easier to backpatch tests that use it. BackgroundPsql was introduced in version 16. On version 16, this

pgsql: Backport BackgroundPsql perl test module

2024-06-27 Thread Heikki Linnakangas
Backport BackgroundPsql perl test module Backport the new BackgroundPsql modules and the constructor functions, background_psql() and interactive_psql, to all supported branches. That makes it easier to backpatch tests that use it. BackgroundPsql was introduced in version 16. On version 16, this

pgsql: Backport BackgroundPsql perl test module

2024-06-27 Thread Heikki Linnakangas
Backport BackgroundPsql perl test module Backport the new BackgroundPsql modules and the constructor functions, background_psql() and interactive_psql, to all supported branches. That makes it easier to backpatch tests that use it. BackgroundPsql was introduced in version 16. On version 16, this