pgsql: Fix pg_recvlogical upon signal termination

2023-07-19 Thread Michael Paquier
Reviewed-by: Andres Freund, Kyotaro Horiguchi, Cary Huang, Michael Paquier Discussion: https://postgr.es/m/20221019213953.htdtzikf4f45y...@awork3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/47556a0013fa64d44add2760577d49cf2eca4cd0 Modified Files --

pgsql: pg_archivecleanup: Add --clean-backup-history

2023-07-18 Thread Michael Paquier
on the oldest segment defined with the command run. Author: Atsushi Torikoshi Reviewed-by: Kyotaro Horiguchi, Fujii Masao, Michael Paquier Discussion: https://postgr.es/m/d660ef741ce3d82f3b4283f1cafd5...@oss.nttdata.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: pg_archivecleanup: Refactor loop doing old segment removals

2023-07-18 Thread Michael Paquier
logic. Author: Atsushi Torikoshi Reviewed-by: Kyotaro Horiguchi, Fujii Masao, Michael Paquier Discussion: https://postgr.es/m/d660ef741ce3d82f3b4283f1cafd5...@oss.nttdata.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4a7556f77c44d295241d2432094b40156f69be1a

pgsql: Fix indentation in twophase.c

2023-07-17 Thread Michael Paquier
Fix indentation in twophase.c This has been missed in cb0cca1, noticed before buildfarm member koel has been able to complain while poking at a different patch. Like the other commit, backpatch all the way down to limit the odds of merge conflicts. Backpatch-through: 11 Branch -- master

pgsql: Fix indentation in twophase.c

2023-07-17 Thread Michael Paquier
Fix indentation in twophase.c This has been missed in cb0cca1, noticed before buildfarm member koel has been able to complain while poking at a different patch. Like the other commit, backpatch all the way down to limit the odds of merge conflicts. Backpatch-through: 11 Branch --

pgsql: Fix indentation in twophase.c

2023-07-17 Thread Michael Paquier
Fix indentation in twophase.c This has been missed in cb0cca1, noticed before buildfarm member koel has been able to complain while poking at a different patch. Like the other commit, backpatch all the way down to limit the odds of merge conflicts. Backpatch-through: 11 Branch --

pgsql: Fix indentation in twophase.c

2023-07-17 Thread Michael Paquier
Fix indentation in twophase.c This has been missed in cb0cca1, noticed before buildfarm member koel has been able to complain while poking at a different patch. Like the other commit, backpatch all the way down to limit the odds of merge conflicts. Backpatch-through: 11 Branch --

pgsql: Fix indentation in twophase.c

2023-07-17 Thread Michael Paquier
Fix indentation in twophase.c This has been missed in cb0cca1, noticed before buildfarm member koel has been able to complain while poking at a different patch. Like the other commit, backpatch all the way down to limit the odds of merge conflicts. Backpatch-through: 11 Branch --

pgsql: Fix indentation in twophase.c

2023-07-17 Thread Michael Paquier
Fix indentation in twophase.c This has been missed in cb0cca1, noticed before buildfarm member koel has been able to complain while poking at a different patch. Like the other commit, backpatch all the way down to limit the odds of merge conflicts. Backpatch-through: 11 Branch --

pgsql: Fix indentation in twophase.c

2023-07-17 Thread Michael Paquier
Fix indentation in twophase.c This has been missed in cb0cca1, noticed before buildfarm member koel has been able to complain while poking at a different patch. Like the other commit, backpatch all the way down to limit the odds of merge conflicts. Backpatch-through: 11 Branch --

pgsql: Fix recovery of 2PC transaction during crash recovery

2023-07-17 Thread Michael Paquier
a PANIC in the middle of a checkpoint. Issue introduced in 728bd99, so backpatch all the way down. Reported-by: "suyu.cmj" Author: "suyu.cmj" Author: Michael Paquier Discussion: https://postgr.es/m/109e6994-b971-48cb-84f6-829646f18b4c.mengjuan@alibaba-inc.com Backpatch

pgsql: Fix recovery of 2PC transaction during crash recovery

2023-07-17 Thread Michael Paquier
a PANIC in the middle of a checkpoint. Issue introduced in 728bd99, so backpatch all the way down. Reported-by: "suyu.cmj" Author: "suyu.cmj" Author: Michael Paquier Discussion: https://postgr.es/m/109e6994-b971-48cb-84f6-829646f18b4c.mengjuan@alibaba-inc.com Backpatch

pgsql: Fix recovery of 2PC transaction during crash recovery

2023-07-17 Thread Michael Paquier
a PANIC in the middle of a checkpoint. Issue introduced in 728bd99, so backpatch all the way down. Reported-by: "suyu.cmj" Author: "suyu.cmj" Author: Michael Paquier Discussion: https://postgr.es/m/109e6994-b971-48cb-84f6-829646f18b4c.mengjuan@alibaba-inc.com Backpatch

pgsql: Fix recovery of 2PC transaction during crash recovery

2023-07-17 Thread Michael Paquier
a PANIC in the middle of a checkpoint. Issue introduced in 728bd99, so backpatch all the way down. Reported-by: "suyu.cmj" Author: "suyu.cmj" Author: Michael Paquier Discussion: https://postgr.es/m/109e6994-b971-48cb-84f6-829646f18b4c.mengjuan@alibaba-inc.com Backpatch

pgsql: Fix recovery of 2PC transaction during crash recovery

2023-07-17 Thread Michael Paquier
a PANIC in the middle of a checkpoint. Issue introduced in 728bd99, so backpatch all the way down. Reported-by: "suyu.cmj" Author: "suyu.cmj" Author: Michael Paquier Discussion: https://postgr.es/m/109e6994-b971-48cb-84f6-829646f18b4c.mengjuan@alibaba-inc.com Backpatch

pgsql: Fix recovery of 2PC transaction during crash recovery

2023-07-17 Thread Michael Paquier
a PANIC in the middle of a checkpoint. Issue introduced in 728bd99, so backpatch all the way down. Reported-by: "suyu.cmj" Author: "suyu.cmj" Author: Michael Paquier Discussion: https://postgr.es/m/109e6994-b971-48cb-84f6-829646f18b4c.mengjuan@alibaba-inc.com Backpatch

pgsql: Fix recovery of 2PC transaction during crash recovery

2023-07-17 Thread Michael Paquier
a PANIC in the middle of a checkpoint. Issue introduced in 728bd99, so backpatch all the way down. Reported-by: "suyu.cmj" Author: "suyu.cmj" Author: Michael Paquier Discussion: https://postgr.es/m/109e6994-b971-48cb-84f6-829646f18b4c.mengjuan@alibaba-inc.com Backpatch

pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf

2023-07-13 Thread Michael Paquier
on the syscache. Unfortunately, this may not be the case of out-of-core code, that could see out-of-date value. Author: Shruthi Gowda Reviewed-by: Robert Haas, Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/caasxf_pbcxax0ww-3geruyftz0xrcs3lrpuhq4-z3fak1do...@mail.gmail.com

pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf

2023-07-13 Thread Michael Paquier
on the syscache. Unfortunately, this may not be the case of out-of-core code, that could see out-of-date value. Author: Shruthi Gowda Reviewed-by: Robert Haas, Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/caasxf_pbcxax0ww-3geruyftz0xrcs3lrpuhq4-z3fak1do...@mail.gmail.com

pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf

2023-07-13 Thread Michael Paquier
on the syscache. Unfortunately, this may not be the case of out-of-core code, that could see out-of-date value. Author: Shruthi Gowda Reviewed-by: Robert Haas, Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/caasxf_pbcxax0ww-3geruyftz0xrcs3lrpuhq4-z3fak1do...@mail.gmail.com

pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf

2023-07-13 Thread Michael Paquier
on the syscache. Unfortunately, this may not be the case of out-of-core code, that could see out-of-date value. Author: Shruthi Gowda Reviewed-by: Robert Haas, Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/caasxf_pbcxax0ww-3geruyftz0xrcs3lrpuhq4-z3fak1do...@mail.gmail.com

pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf

2023-07-13 Thread Michael Paquier
on the syscache. Unfortunately, this may not be the case of out-of-core code, that could see out-of-date value. Author: Shruthi Gowda Reviewed-by: Robert Haas, Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/caasxf_pbcxax0ww-3geruyftz0xrcs3lrpuhq4-z3fak1do...@mail.gmail.com

pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf

2023-07-13 Thread Michael Paquier
on the syscache. Unfortunately, this may not be the case of out-of-core code, that could see out-of-date value. Author: Shruthi Gowda Reviewed-by: Robert Haas, Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/caasxf_pbcxax0ww-3geruyftz0xrcs3lrpuhq4-z3fak1do...@mail.gmail.com

pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf

2023-07-13 Thread Michael Paquier
on the syscache. Unfortunately, this may not be the case of out-of-core code, that could see out-of-date value. Author: Shruthi Gowda Reviewed-by: Robert Haas, Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/caasxf_pbcxax0ww-3geruyftz0xrcs3lrpuhq4-z3fak1do...@mail.gmail.com

pgsql: Fix updates of indisvalid for partitioned indexes

2023-07-13 Thread Michael Paquier
reported was the following error, with a replica identity update, for instance: "ERROR: attempted to update invisible tuple" This is incorrect since 8b08f7d, so backpatch all the way down. Reported-by: Shruthi Gowda Author: Michael Paquier Reviewed-by: Shruthi Gowda, Dilip Kumar Discussi

pgsql: Fix updates of indisvalid for partitioned indexes

2023-07-13 Thread Michael Paquier
reported was the following error, with a replica identity update, for instance: "ERROR: attempted to update invisible tuple" This is incorrect since 8b08f7d, so backpatch all the way down. Reported-by: Shruthi Gowda Author: Michael Paquier Reviewed-by: Shruthi Gowda, Dilip Kumar Discussi

pgsql: Fix updates of indisvalid for partitioned indexes

2023-07-13 Thread Michael Paquier
reported was the following error, with a replica identity update, for instance: "ERROR: attempted to update invisible tuple" This is incorrect since 8b08f7d, so backpatch all the way down. Reported-by: Shruthi Gowda Author: Michael Paquier Reviewed-by: Shruthi Gowda, Dilip Kumar Discussi

pgsql: Fix updates of indisvalid for partitioned indexes

2023-07-13 Thread Michael Paquier
reported was the following error, with a replica identity update, for instance: "ERROR: attempted to update invisible tuple" This is incorrect since 8b08f7d, so backpatch all the way down. Reported-by: Shruthi Gowda Author: Michael Paquier Reviewed-by: Shruthi Gowda, Dilip Kumar Discussi

pgsql: Fix updates of indisvalid for partitioned indexes

2023-07-13 Thread Michael Paquier
reported was the following error, with a replica identity update, for instance: "ERROR: attempted to update invisible tuple" This is incorrect since 8b08f7d, so backpatch all the way down. Reported-by: Shruthi Gowda Author: Michael Paquier Reviewed-by: Shruthi Gowda, Dilip Kumar Discussi

pgsql: Fix updates of indisvalid for partitioned indexes

2023-07-13 Thread Michael Paquier
reported was the following error, with a replica identity update, for instance: "ERROR: attempted to update invisible tuple" This is incorrect since 8b08f7d, so backpatch all the way down. Reported-by: Shruthi Gowda Author: Michael Paquier Reviewed-by: Shruthi Gowda, Dilip Kumar Discussi

pgsql: Fix updates of indisvalid for partitioned indexes

2023-07-13 Thread Michael Paquier
reported was the following error, with a replica identity update, for instance: "ERROR: attempted to update invisible tuple" This is incorrect since 8b08f7d, so backpatch all the way down. Reported-by: Shruthi Gowda Author: Michael Paquier Reviewed-by: Shruthi Gowda, Dilip Kumar Discussi

pgsql: Add information about line contents on parsing failure of wait_e

2023-07-13 Thread Michael Paquier
Add information about line contents on parsing failure of wait_event_names.txt The contents of the line whose parsing failed was not reported in the error message produced by generate-wait_event_types.pl, making harder than necessary the debugging of incorrectly-shaped entries in the file.

pgsql: Remove double quotes from the second column of wait_event_names.

2023-07-13 Thread Michael Paquier
Remove double quotes from the second column of wait_event_names.txt The double quotes used for the wait event names are not required, as the values quoted are made of single words. The files generated by generate-wait_event_types.pl (pgstat_wait_event.c, wait_event_types.h and

Re: pgsql: Don't include CaseTestExpr in JsonValueExpr.formatted_expr

2023-07-13 Thread Michael Paquier
Hi Amit, On Thu, Jul 13, 2023 at 03:33:07AM +, Amit Langote wrote: > Don't include CaseTestExpr in JsonValueExpr.formatted_expr > > A CaseTestExpr is currently being put into > JsonValueExpr.formatted_expr as placeholder for the result of > evaluating JsonValueExpr.raw_expr, which in turn is

pgsql: Remove duplicated assignment of LLVMJitHandle->lljit

2023-07-13 Thread Michael Paquier
Remove duplicated assignment of LLVMJitHandle->lljit This duplicated assignment when emiting some code not yet compiled. Oversight in 6c57f2e. Author: Matheus Alcantara Reviewed-by: Gurjeet Singh Discussion:

pgsql: Simplify some conditions related to [LW]Lock in generate-wait_ev

2023-07-12 Thread Michael Paquier
is now based on a match of the class names, making it simpler to understand. Author: Masahiro Ikeda, Michael Paquier Discussion: https://postgr.es/m/eaf82a85c0ef1b55dc3b651d3f7b8...@oss.nttdata.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: pgbench: Move constant into format string

2023-07-10 Thread Michael Paquier
pgbench: Move constant into format string As coded, the row data strings generated for pgbench_accounts' COPY in the client-side data generation were always assigning 0 for one of its attributes. This simplifies a bit an upcoming patch to switch client-side data generation of pgbench to use COPY

Re: pgsql: Report index vacuum progress.

2023-07-10 Thread Michael Paquier
On Tue, Jul 11, 2023 at 03:36:32AM +, Masahiko Sawada wrote: > This uses the new parallel message type for progress reporting added > by be06506e7. Seems like this should be f188972. -- Michael signature.asc Description: PGP signature

pgsql: Add more sanity checks with callers of changeDependencyFor()

2023-07-09 Thread Michael Paquier
Add more sanity checks with callers of changeDependencyFor() changeDependencyFor() returns the number of pg_depend entries changed, or 0 if there is a problem. The callers of this routine expect only one dependency to change, but they did not check for the result returned. The following code

pgsql: Fix ALTER EXTENSION SET SCHEMA with objects outside an extension

2023-07-09 Thread Michael Paquier
has been provided by Heikki, that I have tweaked a bit to show the effects on pg_depend for the extension. Reported-by: Heikki Linnakangas Author: Michael Paquier, Heikki Linnakangas Discussion: https://postgr.es/m/20eea594-a05b-4c31-491b-007b6fcee...@iki.fi Backpatch-through: 11 Branch -- mas

pgsql: Fix ALTER EXTENSION SET SCHEMA with objects outside an extension

2023-07-09 Thread Michael Paquier
has been provided by Heikki, that I have tweaked a bit to show the effects on pg_depend for the extension. Reported-by: Heikki Linnakangas Author: Michael Paquier, Heikki Linnakangas Discussion: https://postgr.es/m/20eea594-a05b-4c31-491b-007b6fcee...@iki.fi Backpatch-through: 11 Bra

pgsql: Fix ALTER EXTENSION SET SCHEMA with objects outside an extension

2023-07-09 Thread Michael Paquier
has been provided by Heikki, that I have tweaked a bit to show the effects on pg_depend for the extension. Reported-by: Heikki Linnakangas Author: Michael Paquier, Heikki Linnakangas Discussion: https://postgr.es/m/20eea594-a05b-4c31-491b-007b6fcee...@iki.fi Backpatch-through: 11 Bra

pgsql: Fix ALTER EXTENSION SET SCHEMA with objects outside an extension

2023-07-09 Thread Michael Paquier
has been provided by Heikki, that I have tweaked a bit to show the effects on pg_depend for the extension. Reported-by: Heikki Linnakangas Author: Michael Paquier, Heikki Linnakangas Discussion: https://postgr.es/m/20eea594-a05b-4c31-491b-007b6fcee...@iki.fi Backpatch-through: 11 Bra

pgsql: Fix ALTER EXTENSION SET SCHEMA with objects outside an extension

2023-07-09 Thread Michael Paquier
has been provided by Heikki, that I have tweaked a bit to show the effects on pg_depend for the extension. Reported-by: Heikki Linnakangas Author: Michael Paquier, Heikki Linnakangas Discussion: https://postgr.es/m/20eea594-a05b-4c31-491b-007b6fcee...@iki.fi Backpatch-through: 11 Bra

pgsql: Fix ALTER EXTENSION SET SCHEMA with objects outside an extension

2023-07-09 Thread Michael Paquier
has been provided by Heikki, that I have tweaked a bit to show the effects on pg_depend for the extension. Reported-by: Heikki Linnakangas Author: Michael Paquier, Heikki Linnakangas Discussion: https://postgr.es/m/20eea594-a05b-4c31-491b-007b6fcee...@iki.fi Backpatch-through: 11 Bra

pgsql: Fix ALTER EXTENSION SET SCHEMA with objects outside an extension

2023-07-09 Thread Michael Paquier
has been provided by Heikki, that I have tweaked a bit to show the effects on pg_depend for the extension. Reported-by: Heikki Linnakangas Author: Michael Paquier, Heikki Linnakangas Discussion: https://postgr.es/m/20eea594-a05b-4c31-491b-007b6fcee...@iki.fi Backpatch-through: 11 Bra

pgsql: Fix some comments in ./configure and meson setup files

2023-07-06 Thread Michael Paquier
Fix some comments in ./configure and meson setup files The comments referring to SSL_CTX_set_cert_cb() in ./configure and ./configure.ac were inconsistent, as `autoreconf -i` would show. While on it, fix a typo on a comment related to the same check in meson.build. Issue introduced in 8e278b6,

pgsql: Add GUC parameter "huge_pages_status"

2023-07-05 Thread Michael Paquier
-DEXEC_BACKEND, something that GUCs already handle. Noriyoshi Shinoda has initiated the thread that has led to the result of this commit. Author: Justin Pryzby Reviewed-by: Nathan Bossart, Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/tu4pr8401mb1152ebb0d271f827e2e37a01ee...

pgsql: Add newline at the end of header generated by generate-wait_even

2023-07-05 Thread Michael Paquier
Add newline at the end of header generated by generate-wait_event_types.pl The header file wait_event_types.h was generated without a newline at its end, which was inconsistent with all the other things generated automatically. Per offline gripe from Nathan Bossart. Branch -- master

pgsql: Handle \v as a whitespace character in parsers

2023-07-05 Thread Michael Paquier
Handle \v as a whitespace character in parsers This commit comes as a continuation of the discussion that has led to d522b05, as \v was handled inconsistently when parsing array values or anything going through the parsers, and changing a parser behavior in stable branches is a scary thing to do.

pgsql: Generate automatically code and documentation related to wait ev

2023-07-04 Thread Michael Paquier
"LWLock" treated as exceptions. This commit has been tested with configure/Makefile, the CI and VPATH build. clean, distclean and maintainer-clean were working fine. Author: Bertrand Drouvot, Michael Paquier Discussion: https://postgr.es/m/77a86b3a-c4a8-5f5d-69b9-d70bbf2e9...@gmail.com Bra

pgsql: libpq: Add support for Close on portals and statements

2023-07-03 Thread Michael Paquier
te Fennema Reviewed-by: Jian He, Michael Paquier Discussion: https://postgr.es/m/cageczqtb4xfaopavokudb+l62kt44mnal4z9zz7utrs1trf...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/28b5726561841556dc3e00ffe26b01a8107ee654 Modified Files

pgsql: Fix regression tests of unaccent to work without UTF8 support

2023-07-03 Thread Michael Paquier
Fix regression tests of unaccent to work without UTF8 support The tests of unaccent rely on UTF8 characters, and unlike any other test suite in the tree (fuzzystrmatch, citext, hstore, etc.), they would fail if run on a database that does not support UTF8 encoding. This commit fixes the tests of

pgsql: Show information about flex (version and command path) in meson

2023-07-03 Thread Michael Paquier
Show information about flex (version and command path) in meson output Like bison, this is useful to know which version and command of flex are detected by meson. For example, this was useful for me when using win_flex.exe on Windows. Reviewed-by: Peter Eisentraut Discussion:

pgsql: Remove support for OpenSSL 1.0.1

2023-07-02 Thread Michael Paquier
Remove support for OpenSSL 1.0.1 Here are some notes about this change: - As X509_get_signature_nid() should always exist (OpenSSL and LibreSSL), hence HAVE_X509_GET_SIGNATURE_NID is now gone. - OPENSSL_API_COMPAT is bumped to 0x10002000L. - One comment related to 1.0.1e introduced by 74242c2 is

pgsql: Refactor some code related to wait events "BufferPin" and "Exten

2023-07-02 Thread Michael Paquier
Refactor some code related to wait events "BufferPin" and "Extension" The following changes are done: - Addition of WaitEventBufferPin and WaitEventExtension, that hold a list of wait events related to each category. - Addition of two functions that encapsulate the list of wait events for each

pgsql: Make PG_TEST_NOCLEAN work for temporary directories in TAP tests

2023-07-02 Thread Michael Paquier
Make PG_TEST_NOCLEAN work for temporary directories in TAP tests When set, this environment variable was only effective for data directories but not for all the other temporary files created by PostgreSQL::Test::Utils. Keeping the temporary files after a successful run can be useful for

pgsql: Make PG_TEST_NOCLEAN work for temporary directories in TAP tests

2023-07-02 Thread Michael Paquier
Make PG_TEST_NOCLEAN work for temporary directories in TAP tests When set, this environment variable was only effective for data directories but not for all the other temporary files created by PostgreSQL::Test::Utils. Keeping the temporary files after a successful run can be useful for

pgsql: Make PG_TEST_NOCLEAN work for temporary directories in TAP tests

2023-07-02 Thread Michael Paquier
Make PG_TEST_NOCLEAN work for temporary directories in TAP tests When set, this environment variable was only effective for data directories but not for all the other temporary files created by PostgreSQL::Test::Utils. Keeping the temporary files after a successful run can be useful for

pgsql: Make PG_TEST_NOCLEAN work for temporary directories in TAP tests

2023-07-02 Thread Michael Paquier
Make PG_TEST_NOCLEAN work for temporary directories in TAP tests When set, this environment variable was only effective for data directories but not for all the other temporary files created by PostgreSQL::Test::Utils. Keeping the temporary files after a successful run can be useful for

pgsql: Make PG_TEST_NOCLEAN work for temporary directories in TAP tests

2023-07-02 Thread Michael Paquier
Make PG_TEST_NOCLEAN work for temporary directories in TAP tests When set, this environment variable was only effective for data directories but not for all the other temporary files created by PostgreSQL::Test::Utils. Keeping the temporary files after a successful run can be useful for

pgsql: Make PG_TEST_NOCLEAN work for temporary directories in TAP tests

2023-07-02 Thread Michael Paquier
Make PG_TEST_NOCLEAN work for temporary directories in TAP tests When set, this environment variable was only effective for data directories but not for all the other temporary files created by PostgreSQL::Test::Utils. Keeping the temporary files after a successful run can be useful for

pgsql: Make PG_TEST_NOCLEAN work for temporary directories in TAP tests

2023-07-02 Thread Michael Paquier
Make PG_TEST_NOCLEAN work for temporary directories in TAP tests When set, this environment variable was only effective for data directories but not for all the other temporary files created by PostgreSQL::Test::Utils. Keeping the temporary files after a successful run can be useful for

Re: pgsql: Introduce bloom_filter_size for BRIN bloom opclass

2023-07-02 Thread Michael Paquier
On Sun, Jul 02, 2023 at 08:25:34AM +, Tomas Vondra wrote: > Introduce bloom_filter_size for BRIN bloom opclass > > Move the calculation of Bloom filter parameters (for BRIN indexes) into > a separate function to make reuse easier. At the moment we only call it > from one place, but that may

pgsql: Introduce long options in pg_archivecleanup

2023-06-30 Thread Michael Paquier
/--strip-extension Author: Atsushi Torikoshi Reviewed-by: Fujii Masao, Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/d660ef741ce3d82f3b4283f1cafd5...@oss.nttdata.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix marking of indisvalid for partitioned indexes at creation

2023-06-29 Thread Michael Paquier
Fix marking of indisvalid for partitioned indexes at creation The logic that introduced partitioned indexes missed a few things when invalidating a partitioned index when these are created, still the code is written to handle recursions: 1) If created from scratch because a mapping index could

pgsql: Fix marking of indisvalid for partitioned indexes at creation

2023-06-29 Thread Michael Paquier
Fix marking of indisvalid for partitioned indexes at creation The logic that introduced partitioned indexes missed a few things when invalidating a partitioned index when these are created, still the code is written to handle recursions: 1) If created from scratch because a mapping index could

pgsql: Fix marking of indisvalid for partitioned indexes at creation

2023-06-29 Thread Michael Paquier
Fix marking of indisvalid for partitioned indexes at creation The logic that introduced partitioned indexes missed a few things when invalidating a partitioned index when these are created, still the code is written to handle recursions: 1) If created from scratch because a mapping index could

pgsql: Fix marking of indisvalid for partitioned indexes at creation

2023-06-29 Thread Michael Paquier
Fix marking of indisvalid for partitioned indexes at creation The logic that introduced partitioned indexes missed a few things when invalidating a partitioned index when these are created, still the code is written to handle recursions: 1) If created from scratch because a mapping index could

pgsql: Fix marking of indisvalid for partitioned indexes at creation

2023-06-29 Thread Michael Paquier
Fix marking of indisvalid for partitioned indexes at creation The logic that introduced partitioned indexes missed a few things when invalidating a partitioned index when these are created, still the code is written to handle recursions: 1) If created from scratch because a mapping index could

pgsql: Fix marking of indisvalid for partitioned indexes at creation

2023-06-29 Thread Michael Paquier
Fix marking of indisvalid for partitioned indexes at creation The logic that introduced partitioned indexes missed a few things when invalidating a partitioned index when these are created, still the code is written to handle recursions: 1) If created from scratch because a mapping index could

pgsql: Fix marking of indisvalid for partitioned indexes at creation

2023-06-29 Thread Michael Paquier
Fix marking of indisvalid for partitioned indexes at creation The logic that introduced partitioned indexes missed a few things when invalidating a partitioned index when these are created, still the code is written to handle recursions: 1) If created from scratch because a mapping index could

pgsql: Add tab completion for CREATE SCHEMA in psql

2023-06-29 Thread Michael Paquier
supported in an embedded CREATE SCHEMA command. While on it, this commit adjusts the completion done after CREATE UNLOGGED: - Addition of SEQUENCE. - Avoid suggesting MATERIALIZED VIEW in CREATE TABLE. Author: Dagfinn Ilmari Mannsåker Reviewed-by: Suraj Khamkar, Michael Paquier Discussion: https

pgsql: Use named captures in Catalog::ParseHeader()

2023-06-29 Thread Michael Paquier
Use named captures in Catalog::ParseHeader() Using at least perl 5.14 is required since 4c15327, meaning that it is possible to use named captures and the %+ hash instead of having to count parenthesis groups manually. While on it, CATALOG is made more flexible in its handling of whitespaces for

pgsql: Fix pg_depend entry to AMs after ALTER TABLE .. SET ACCESS METHO

2023-06-29 Thread Michael Paquier
Fix pg_depend entry to AMs after ALTER TABLE .. SET ACCESS METHOD ALTER TABLE .. SET ACCESS METHOD was not registering a dependency to the new access method with the relation altered in its rewrite phase, making possible the drop of an access method even if there are relations that depend on it.

pgsql: Fix pg_depend entry to AMs after ALTER TABLE .. SET ACCESS METHO

2023-06-29 Thread Michael Paquier
Fix pg_depend entry to AMs after ALTER TABLE .. SET ACCESS METHOD ALTER TABLE .. SET ACCESS METHOD was not registering a dependency to the new access method with the relation altered in its rewrite phase, making possible the drop of an access method even if there are relations that depend on it.

pgsql: pg_stat_statements: Fix second comment related to entry resets

2023-06-28 Thread Michael Paquier
pg_stat_statements: Fix second comment related to entry resets This should have been part of dc73db6, but it got lost in the mix. Oversight in 6b4d23f. Author: Japin Li Discussion: https://postgr.es/m/meyp282mb1669fc91c764e277821936d3b6...@meyp282mb1669.ausp282.prod.outlook.com

pgsql: pg_stat_statements: Fix second comment related to entry resets

2023-06-28 Thread Michael Paquier
pg_stat_statements: Fix second comment related to entry resets This should have been part of dc73db6, but it got lost in the mix. Oversight in 6b4d23f. Author: Japin Li Discussion: https://postgr.es/m/meyp282mb1669fc91c764e277821936d3b6...@meyp282mb1669.ausp282.prod.outlook.com

pgsql: pg_stat_statements: Fix second comment related to entry resets

2023-06-28 Thread Michael Paquier
pg_stat_statements: Fix second comment related to entry resets This should have been part of dc73db6, but it got lost in the mix. Oversight in 6b4d23f. Author: Japin Li Discussion: https://postgr.es/m/meyp282mb1669fc91c764e277821936d3b6...@meyp282mb1669.ausp282.prod.outlook.com

pgsql: pg_stat_statements: Fix incorrect comment with entry resets

2023-06-28 Thread Michael Paquier
pg_stat_statements: Fix incorrect comment with entry resets Oversight in 6b4d23f. Author: Japin Li, Richard Guo Discussion: https://postgr.es/m/meyp282mb1669fc91c764e277821936d3b6...@meyp282mb1669.ausp282.prod.outlook.com Backpatch-through: 14 Branch -- REL_15_STABLE Details ---

pgsql: pg_stat_statements: Fix incorrect comment with entry resets

2023-06-28 Thread Michael Paquier
pg_stat_statements: Fix incorrect comment with entry resets Oversight in 6b4d23f. Author: Japin Li, Richard Guo Discussion: https://postgr.es/m/meyp282mb1669fc91c764e277821936d3b6...@meyp282mb1669.ausp282.prod.outlook.com Backpatch-through: 14 Branch -- master Details ---

pgsql: pg_stat_statements: Fix incorrect comment with entry resets

2023-06-28 Thread Michael Paquier
pg_stat_statements: Fix incorrect comment with entry resets Oversight in 6b4d23f. Author: Japin Li, Richard Guo Discussion: https://postgr.es/m/meyp282mb1669fc91c764e277821936d3b6...@meyp282mb1669.ausp282.prod.outlook.com Backpatch-through: 14 Branch -- REL_14_STABLE Details ---

pgsql: Add timeline ID to file names generated with pg_waldump --save-f

2023-06-28 Thread Michael Paquier
Add timeline ID to file names generated with pg_waldump --save-fullpage Not including the timeline IDs to the file names generated by pg_waldump for the individual blocks saved could cause some of these files to be overwritten when scanning segments across multiple timelines. Having this

pgsql: Ignore invalid indexes when enforcing index rules in ALTER TABLE

2023-06-28 Thread Michael Paquier
Ignore invalid indexes when enforcing index rules in ALTER TABLE ATTACH PARTITION A portion of ALTER TABLE .. ATTACH PARTITION is to ensure that the partition being attached to the partitioned table has a correct set of indexes, so as there is a consistent index mapping between the partitioned

pgsql: Ignore invalid indexes when enforcing index rules in ALTER TABLE

2023-06-28 Thread Michael Paquier
Ignore invalid indexes when enforcing index rules in ALTER TABLE ATTACH PARTITION A portion of ALTER TABLE .. ATTACH PARTITION is to ensure that the partition being attached to the partitioned table has a correct set of indexes, so as there is a consistent index mapping between the partitioned

pgsql: Ignore invalid indexes when enforcing index rules in ALTER TABLE

2023-06-28 Thread Michael Paquier
Ignore invalid indexes when enforcing index rules in ALTER TABLE ATTACH PARTITION A portion of ALTER TABLE .. ATTACH PARTITION is to ensure that the partition being attached to the partitioned table has a correct set of indexes, so as there is a consistent index mapping between the partitioned

pgsql: Ignore invalid indexes when enforcing index rules in ALTER TABLE

2023-06-28 Thread Michael Paquier
Ignore invalid indexes when enforcing index rules in ALTER TABLE ATTACH PARTITION A portion of ALTER TABLE .. ATTACH PARTITION is to ensure that the partition being attached to the partitioned table has a correct set of indexes, so as there is a consistent index mapping between the partitioned

pgsql: Ignore invalid indexes when enforcing index rules in ALTER TABLE

2023-06-28 Thread Michael Paquier
Ignore invalid indexes when enforcing index rules in ALTER TABLE ATTACH PARTITION A portion of ALTER TABLE .. ATTACH PARTITION is to ensure that the partition being attached to the partitioned table has a correct set of indexes, so as there is a consistent index mapping between the partitioned

pgsql: Ignore invalid indexes when enforcing index rules in ALTER TABLE

2023-06-28 Thread Michael Paquier
Ignore invalid indexes when enforcing index rules in ALTER TABLE ATTACH PARTITION A portion of ALTER TABLE .. ATTACH PARTITION is to ensure that the partition being attached to the partitioned table has a correct set of indexes, so as there is a consistent index mapping between the partitioned

pgsql: Remove dependency to query text in JumbleQuery()

2023-06-27 Thread Michael Paquier
Remove dependency to query text in JumbleQuery() Since 3db72eb, the query ID of utilities is generated using the Query structure, making the use of the query string in JumbleQuery() unnecessary. This commit removes the argument "querytext" from JumbleQuery(). Reported-by: Joe Conway

pgsql: Define OPENSSL_API_COMPAT

2023-06-24 Thread Michael Paquier
Define OPENSSL_API_COMPAT This avoids deprecation warnings from newer OpenSSL versions (3.0.0 in particular). This has been originally applied as 4d3db13 for v14 and newer versions, but not on the older branches out of caution, and this commit closes the gap to remove all these deprecation

pgsql: Define OPENSSL_API_COMPAT

2023-06-24 Thread Michael Paquier
Define OPENSSL_API_COMPAT This avoids deprecation warnings from newer OpenSSL versions (3.0.0 in particular). This has been originally applied as 4d3db13 for v14 and newer versions, but not on the older branches out of caution, and this commit closes the gap to remove all these deprecation

pgsql: Define OPENSSL_API_COMPAT

2023-06-24 Thread Michael Paquier
Define OPENSSL_API_COMPAT This avoids deprecation warnings from newer OpenSSL versions (3.0.0 in particular). This has been originally applied as 4d3db13 for v14 and newer versions, but not on the older branches out of caution, and this commit closes the gap to remove all these deprecation

pgsql: Fix incorrect error message in libpq_pipeline

2023-06-23 Thread Michael Paquier
Fix incorrect error message in libpq_pipeline One of the tests for the pipeline mode with portal description expects a non-NULL PQgetResult, but used an incorrect error message on failure, telling that PQgetResult being NULL was the expected result. Author: Jelte Fennema Discussion:

pgsql: Fix incorrect error message in libpq_pipeline

2023-06-23 Thread Michael Paquier
Fix incorrect error message in libpq_pipeline One of the tests for the pipeline mode with portal description expects a non-NULL PQgetResult, but used an incorrect error message on failure, telling that PQgetResult being NULL was the expected result. Author: Jelte Fennema Discussion:

pgsql: Fix incorrect error message in libpq_pipeline

2023-06-23 Thread Michael Paquier
Fix incorrect error message in libpq_pipeline One of the tests for the pipeline mode with portal description expects a non-NULL PQgetResult, but used an incorrect error message on failure, telling that PQgetResult being NULL was the expected result. Author: Jelte Fennema Discussion:

pgsql: Disable use of archiving in 009_twophase.pl

2023-06-21 Thread Michael Paquier
Disable use of archiving in 009_twophase.pl This partially reverts 68cb5af, as using archiving to enforce the rename of the last partial segment of the old timeline at promotion to use .partial as suffix is impacting the tests when it does switchovers. As showed by the logs gathered by the CI in

pgsql: Disable use of archiving in 009_twophase.pl

2023-06-21 Thread Michael Paquier
Disable use of archiving in 009_twophase.pl This partially reverts 68cb5af, as using archiving to enforce the rename of the last partial segment of the old timeline at promotion to use .partial as suffix is impacting the tests when it does switchovers. As showed by the logs gathered by the CI in

pgsql: Disable use of archiving in 009_twophase.pl

2023-06-21 Thread Michael Paquier
Disable use of archiving in 009_twophase.pl This partially reverts 68cb5af, as using archiving to enforce the rename of the last partial segment of the old timeline at promotion to use .partial as suffix is impacting the tests when it does switchovers. As showed by the logs gathered by the CI in

pgsql: Disable use of archiving in 009_twophase.pl

2023-06-21 Thread Michael Paquier
Disable use of archiving in 009_twophase.pl This partially reverts 68cb5af, as using archiving to enforce the rename of the last partial segment of the old timeline at promotion to use .partial as suffix is impacting the tests when it does switchovers. As showed by the logs gathered by the CI in

<    1   2   3   4   5   6   7   8   9   10   >