pgsql: Make use of PG_INT64_MAX/PG_INT64_MIN

2021-09-21 Thread Peter Eisentraut
Make use of PG_INT64_MAX/PG_INT64_MIN This code was written before those symbols were introduced, but now we can simplify it. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f9ea2960310c235a7ae97847c0757eba9f6f9a85 Modified Files --

pgsql: Invalidate all partitions for a partitioned table in publication

2021-09-21 Thread Amit Kapila
Invalidate all partitions for a partitioned table in publication. Updates/Deletes on a partition were allowed even without replica identity after the parent table was added to a publication. This would later lead to an error on subscribers. The reason was that we were not invalidating the

pgsql: Invalidate all partitions for a partitioned table in publication

2021-09-21 Thread Amit Kapila
Invalidate all partitions for a partitioned table in publication. Updates/Deletes on a partition were allowed even without replica identity after the parent table was added to a publication. This would later lead to an error on subscribers. The reason was that we were not invalidating the

pgsql: Invalidate all partitions for a partitioned table in publication

2021-09-21 Thread Amit Kapila
Invalidate all partitions for a partitioned table in publication. Updates/Deletes on a partition were allowed even without replica identity after the parent table was added to a publication. This would later lead to an error on subscribers. The reason was that we were not invalidating the

pgsql: Add parent table name in an error in reorderbuffer.c.

2021-09-21 Thread Amit Kapila
Add parent table name in an error in reorderbuffer.c. This can help in troubleshooting the cause of a particular error that can occur during decoding. Author: Jeremy Schneider Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/808ed65b-994c-915a-361c-577f088b8...@amazon.com Branch --

pgsql: Fix "single value strategy" index deletion issue.

2021-09-21 Thread Peter Geoghegan
Fix "single value strategy" index deletion issue. It is not appropriate for deduplication to apply single value strategy when triggered by a bottom-up index deletion pass. This wastes cycles because later bottom-up deletion passes will overinterpret older duplicate tuples that deduplication

pgsql: Fix "single value strategy" index deletion issue.

2021-09-21 Thread Peter Geoghegan
Fix "single value strategy" index deletion issue. It is not appropriate for deduplication to apply single value strategy when triggered by a bottom-up index deletion pass. This wastes cycles because later bottom-up deletion passes will overinterpret older duplicate tuples that deduplication

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-21 Thread Michael Paquier
On Tue, Sep 21, 2021 at 03:12:02PM +0900, Michael Paquier wrote: > Thanks. I'll group this stuff with what I still need to do for Msys. > This just needs to wait until RC1 is tagged as I need to address the > existing issues in TestLib.pm first. 1a9d8028 should have taken care of the problem.

pgsql: Fix some issues with TAP tests for postgres -C

2021-09-21 Thread Michael Paquier
Fix some issues with TAP tests for postgres -C This addresses two issues with the tests added in 0c39c292 for runtime GUCs: - Re-enable the test on Msys. The test could fail because of \r\n generated by Msys perl. 0d91c52a has taken care of this issue. - Allow the test to run in the context of

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-21 Thread Michael Paquier
On Tue, Sep 21, 2021 at 08:30:13AM +0900, Michael Paquier wrote: > Please note that I am planning to get the fixes in TestLib.pm applied > and back-patched to prevent surprises if there is any bug fix that > introduces a test where this could be hit. As 14 RC1 has just been > stamped, this will

pgsql: Fix places in TestLib.pm in need of adaptation to the output of

2021-09-21 Thread Michael Paquier
Fix places in TestLib.pm in need of adaptation to the output of Msys perl Contrary to the output of native perl, Msys perl generates outputs with CRLFs characters. There are already places in the TAP code where CRLFs (\r\n) are automatically converted to LF (\n) on Msys, but we missed a couple

pgsql: Fix places in TestLib.pm in need of adaptation to the output of

2021-09-21 Thread Michael Paquier
Fix places in TestLib.pm in need of adaptation to the output of Msys perl Contrary to the output of native perl, Msys perl generates outputs with CRLFs characters. There are already places in the TAP code where CRLFs (\r\n) are automatically converted to LF (\n) on Msys, but we missed a couple

pgsql: Fix places in TestLib.pm in need of adaptation to the output of

2021-09-21 Thread Michael Paquier
Fix places in TestLib.pm in need of adaptation to the output of Msys perl Contrary to the output of native perl, Msys perl generates outputs with CRLFs characters. There are already places in the TAP code where CRLFs (\r\n) are automatically converted to LF (\n) on Msys, but we missed a couple

pgsql: Fix places in TestLib.pm in need of adaptation to the output of

2021-09-21 Thread Michael Paquier
Fix places in TestLib.pm in need of adaptation to the output of Msys perl Contrary to the output of native perl, Msys perl generates outputs with CRLFs characters. There are already places in the TAP code where CRLFs (\r\n) are automatically converted to LF (\n) on Msys, but we missed a couple

pgsql: Fix places in TestLib.pm in need of adaptation to the output of

2021-09-21 Thread Michael Paquier
Fix places in TestLib.pm in need of adaptation to the output of Msys perl Contrary to the output of native perl, Msys perl generates outputs with CRLFs characters. There are already places in the TAP code where CRLFs (\r\n) are automatically converted to LF (\n) on Msys, but we missed a couple

pgsql: Fix places in TestLib.pm in need of adaptation to the output of

2021-09-21 Thread Michael Paquier
Fix places in TestLib.pm in need of adaptation to the output of Msys perl Contrary to the output of native perl, Msys perl generates outputs with CRLFs characters. There are already places in the TAP code where CRLFs (\r\n) are automatically converted to LF (\n) on Msys, but we missed a couple

pgsql: Fix places in TestLib.pm in need of adaptation to the output of

2021-09-21 Thread Michael Paquier
Fix places in TestLib.pm in need of adaptation to the output of Msys perl Contrary to the output of native perl, Msys perl generates outputs with CRLFs characters. There are already places in the TAP code where CRLFs (\r\n) are automatically converted to LF (\n) on Msys, but we missed a couple

pgsql: Fix misevaluation of STABLE parameters in CALL within plpgsql.

2021-09-21 Thread Tom Lane
Fix misevaluation of STABLE parameters in CALL within plpgsql. Before commit 84f5c2908, a STABLE function in a plpgsql CALL statement's argument list would see an up-to-date snapshot, because exec_stmt_call would push a new snapshot. I got rid of that because the possibility of the snapshot

pgsql: Fix misevaluation of STABLE parameters in CALL within plpgsql.

2021-09-21 Thread Tom Lane
Fix misevaluation of STABLE parameters in CALL within plpgsql. Before commit 84f5c2908, a STABLE function in a plpgsql CALL statement's argument list would see an up-to-date snapshot, because exec_stmt_call would push a new snapshot. I got rid of that because the possibility of the snapshot

pgsql: Fix misevaluation of STABLE parameters in CALL within plpgsql.

2021-09-21 Thread Tom Lane
Fix misevaluation of STABLE parameters in CALL within plpgsql. Before commit 84f5c2908, a STABLE function in a plpgsql CALL statement's argument list would see an up-to-date snapshot, because exec_stmt_call would push a new snapshot. I got rid of that because the possibility of the snapshot

pgsql: Fix misevaluation of STABLE parameters in CALL within plpgsql.

2021-09-21 Thread Tom Lane
Fix misevaluation of STABLE parameters in CALL within plpgsql. Before commit 84f5c2908, a STABLE function in a plpgsql CALL statement's argument list would see an up-to-date snapshot, because exec_stmt_call would push a new snapshot. I got rid of that because the possibility of the snapshot

pgsql: Fix misevaluation of STABLE parameters in CALL within plpgsql.

2021-09-21 Thread Tom Lane
Fix misevaluation of STABLE parameters in CALL within plpgsql. Before commit 84f5c2908, a STABLE function in a plpgsql CALL statement's argument list would see an up-to-date snapshot, because exec_stmt_call would push a new snapshot. I got rid of that because the possibility of the snapshot

pgsql: Document XLOG_INCLUDE_XID a little better

2021-09-21 Thread Alvaro Herrera
Document XLOG_INCLUDE_XID a little better I noticed that commit 0bead9af484c left this flag undocumented in XLogSetRecordFlags, which led me to discover that the flag doesn't actually do what the one comment on it said it does. Improve the situation by adding some more comments. Backpatch to

pgsql: Document XLOG_INCLUDE_XID a little better

2021-09-21 Thread Alvaro Herrera
Document XLOG_INCLUDE_XID a little better I noticed that commit 0bead9af484c left this flag undocumented in XLogSetRecordFlags, which led me to discover that the flag doesn't actually do what the one comment on it said it does. Improve the situation by adding some more comments. Backpatch to

pgsql: Tag refs/tags/REL_14_RC1 was created

2021-09-21 Thread noreply
Tag refs/tags/REL_14_RC1 was created.

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-21 Thread Michael Paquier
On Mon, Sep 20, 2021 at 10:33:05PM -0700, Andres Freund wrote: > And while not finished entirely, the checksum tests passed: > > [05:28:13.788] t/001_basic.pl ok > [05:28:35.762] t/002_actions.pl .. ok > [05:28:35.767] All tests successful. > [05:28:35.767] Files=2, Tests=74, 22 wallclock

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-21 Thread Andres Freund
Hi, On 2021-09-21 14:37:05 +0900, Michael Paquier wrote: > > If interesting I can also come up with the necessary steps to activate > > it in your repo... > > That could be helpful. I have never played with those tools. It's really useful. I'm planning to propose a bit more minimal version to