pgsql: Fix ENABLE/DISABLE TRIGGER to handle recursion correctly

2022-08-05 Thread Alvaro Herrera
Fix ENABLE/DISABLE TRIGGER to handle recursion correctly Using ATSimpleRecursion() in ATPrepCmd() to do so as bbb927b4db9b did is not correct, because ATPrepCmd() can't distinguish between triggers that may be cloned and those that may not, so would wrongly try to recurse for the latter category

Re: pgsql: Add wait_for_subscription_sync for TAP tests.

2022-08-03 Thread Alvaro Herrera
On 2022-Aug-03, Amit Kapila wrote: > The new function wait_for_subscription_sync() can be used to replace the > above code. This eliminates duplicated code and makes it easier to write > future tests. Hmm, if you don't backpatch this, it might become a hurdle if we later backpatch tests that use

pgsql: Fix test instability

2022-07-29 Thread Alvaro Herrera
Fix test instability On FreeBSD, the new test fails due to a WAL file being removed before the standby has had the chance to copy it. Fix by adding a replication slot to prevent the removal until after the standby has connected. Author: Kyotaro Horiguchi Reported-by: Matthias van de Meent

pgsql: Fix test instability

2022-07-29 Thread Alvaro Herrera
Fix test instability On FreeBSD, the new test fails due to a WAL file being removed before the standby has had the chance to copy it. Fix by adding a replication slot to prevent the removal until after the standby has connected. Author: Kyotaro Horiguchi Reported-by: Matthias van de Meent

pgsql: Fix test instability

2022-07-29 Thread Alvaro Herrera
Fix test instability On FreeBSD, the new test fails due to a WAL file being removed before the standby has had the chance to copy it. Fix by adding a replication slot to prevent the removal until after the standby has connected. Author: Kyotaro Horiguchi Reported-by: Matthias van de Meent

pgsql: Fix test instability

2022-07-29 Thread Alvaro Herrera
Fix test instability On FreeBSD, the new test fails due to a WAL file being removed before the standby has had the chance to copy it. Fix by adding a replication slot to prevent the removal until after the standby has connected. Author: Kyotaro Horiguchi Reported-by: Matthias van de Meent

pgsql: Fix test instability

2022-07-29 Thread Alvaro Herrera
Fix test instability On FreeBSD, the new test fails due to a WAL file being removed before the standby has had the chance to copy it. Fix by adding a replication slot to prevent the removal until after the standby has connected. Author: Kyotaro Horiguchi Reported-by: Matthias van de Meent

pgsql: Fix test instability

2022-07-29 Thread Alvaro Herrera
Fix test instability On FreeBSD, the new test fails due to a WAL file being removed before the standby has had the chance to copy it. Fix by adding a replication slot to prevent the removal until after the standby has connected. Author: Kyotaro Horiguchi Reported-by: Matthias van de Meent

pgsql: Fix test instability

2022-07-29 Thread Alvaro Herrera
Fix test instability On FreeBSD, the new test fails due to a WAL file being removed before the standby has had the chance to copy it. Fix by adding a replication slot to prevent the removal until after the standby has connected. Author: Kyotaro Horiguchi Reported-by: Matthias van de Meent

pgsql: doc: avoid saying "inheritance" ...

2022-07-28 Thread Alvaro Herrera
doc: avoid saying "inheritance" ... ... when it applies to partitioned relations. This is almost the opposite of 0c06534bd63b, which removed references to "partition" in favour of "child". Author: Justin Pryzby Reviewed-by: Ashutosh Bapat Reviewed-by: Amit Langote Discussion:

pgsql: doc: avoid saying "inheritance" ...

2022-07-28 Thread Alvaro Herrera
doc: avoid saying "inheritance" ... ... when it applies to partitioned relations. This is almost the opposite of 0c06534bd63b, which removed references to "partition" in favour of "child". Author: Justin Pryzby Reviewed-by: Ashutosh Bapat Reviewed-by: Amit Langote Discussion:

pgsql: Fix replay of create database records on standby

2022-07-28 Thread Alvaro Herrera
Fix replay of create database records on standby Crash recovery on standby may encounter missing directories when replaying database-creation WAL records. Prior to this patch, the standby would fail to recover in such a case; however, the directories could be legitimately missing. Consider the

pgsql: Fix replay of create database records on standby

2022-07-28 Thread Alvaro Herrera
Fix replay of create database records on standby Crash recovery on standby may encounter missing directories when replaying database-creation WAL records. Prior to this patch, the standby would fail to recover in such a case; however, the directories could be legitimately missing. Consider the

pgsql: Fix replay of create database records on standby

2022-07-28 Thread Alvaro Herrera
Fix replay of create database records on standby Crash recovery on standby may encounter missing directories when replaying database-creation WAL records. Prior to this patch, the standby would fail to recover in such a case; however, the directories could be legitimately missing. Consider the

pgsql: Fix replay of create database records on standby

2022-07-28 Thread Alvaro Herrera
Fix replay of create database records on standby Crash recovery on standby may encounter missing directories when replaying database-creation WAL records. Prior to this patch, the standby would fail to recover in such a case; however, the directories could be legitimately missing. Consider the

pgsql: Fix replay of create database records on standby

2022-07-28 Thread Alvaro Herrera
Fix replay of create database records on standby Crash recovery on standby may encounter missing directories when replaying database-creation WAL records. Prior to this patch, the standby would fail to recover in such a case; however, the directories could be legitimately missing. Consider the

pgsql: Fix replay of create database records on standby

2022-07-28 Thread Alvaro Herrera
Fix replay of create database records on standby Crash recovery on standby may encounter missing directories when replaying database-creation WAL records. Prior to this patch, the standby would fail to recover in such a case; however, the directories could be legitimately missing. Consider the

pgsql: Fix replay of create database records on standby

2022-07-28 Thread Alvaro Herrera
Fix replay of create database records on standby Crash recovery on standby may encounter missing directories when replaying database-creation WAL records. Prior to this patch, the standby would fail to recover in such a case; however, the directories could be legitimately missing. Consider the

pgsql: Allow "in place" tablespaces.

2022-07-27 Thread Alvaro Herrera
Allow "in place" tablespaces. This is a backpatch to branches 10-14 of the following commits: 7170f2159fb2 Allow "in place" tablespaces. c6f2f01611d4 Fix pg_basebackup with in-place tablespaces. f6f0db4d6240 Fix pg_tablespace_location() with in-place tablespaces 7a7cd84893e0 doc: Remove mention

pgsql: Allow "in place" tablespaces.

2022-07-27 Thread Alvaro Herrera
Allow "in place" tablespaces. This is a backpatch to branches 10-14 of the following commits: 7170f2159fb2 Allow "in place" tablespaces. c6f2f01611d4 Fix pg_basebackup with in-place tablespaces. f6f0db4d6240 Fix pg_tablespace_location() with in-place tablespaces 7a7cd84893e0 doc: Remove mention

pgsql: Allow "in place" tablespaces.

2022-07-27 Thread Alvaro Herrera
Allow "in place" tablespaces. This is a backpatch to branches 10-14 of the following commits: 7170f2159fb2 Allow "in place" tablespaces. c6f2f01611d4 Fix pg_basebackup with in-place tablespaces. f6f0db4d6240 Fix pg_tablespace_location() with in-place tablespaces 7a7cd84893e0 doc: Remove mention

pgsql: Allow "in place" tablespaces.

2022-07-27 Thread Alvaro Herrera
Allow "in place" tablespaces. This is a backpatch to branches 10-14 of the following commits: 7170f2159fb2 Allow "in place" tablespaces. c6f2f01611d4 Fix pg_basebackup with in-place tablespaces. f6f0db4d6240 Fix pg_tablespace_location() with in-place tablespaces 7a7cd84893e0 doc: Remove mention

pgsql: Allow "in place" tablespaces.

2022-07-27 Thread Alvaro Herrera
Allow "in place" tablespaces. This is a backpatch to branches 10-14 of the following commits: 7170f2159fb2 Allow "in place" tablespaces. c6f2f01611d4 Fix pg_basebackup with in-place tablespaces. f6f0db4d6240 Fix pg_tablespace_location() with in-place tablespaces 7a7cd84893e0 doc: Remove mention

pgsql: Fix [install]check in interfaces/libpq/Makefile

2022-07-22 Thread Alvaro Herrera
Fix [install]check in interfaces/libpq/Makefile The common recipe when TAP tests are disabled doesn't work, because the libpq-specific recipe wants to define the PATH environment variable, so the starting '@' is misinterpreted as part of the command instead of silencing said command. Fix by

pgsql: Fix [install]check in interfaces/libpq/Makefile

2022-07-22 Thread Alvaro Herrera
Fix [install]check in interfaces/libpq/Makefile The common recipe when TAP tests are disabled doesn't work, because the libpq-specific recipe wants to define the PATH environment variable, so the starting '@' is misinterpreted as part of the command instead of silencing said command. Fix by

pgsql: Rework grammar for REINDEX

2022-07-22 Thread Alvaro Herrera
Rework grammar for REINDEX The part of grammar have grown needlessly duplicative and more complex that necessary. Rewrite. Reviewed-by: Michaël Paquier Discussion: https://postgr.es/m/20220721174212.cmitjpuimx6ssyyj@alvherre.pgsql Branch -- master Details ---

pgsql: parser: centralize common auxiliary productions

2022-07-22 Thread Alvaro Herrera
parser: centralize common auxiliary productions Things like "opt_name" can well be shared by various commands rather than there being multiple definitions of the same thing. Rename these productions and move them to appear together in gram.y, which may improve chances of reuse in the future.

pgsql: Update src/backend/parser/README

2022-07-22 Thread Alvaro Herrera
Update src/backend/parser/README New files have been added to this directory, but not listed here. Repair. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9853bf6ab0e3d869d04a3a22959a3c41bf01f0e0 Modified Files -- src/backend/parser/README | 3 +++ 1

pgsql: Add PGDLLEXPORTS to some plpgsql function declarations

2022-07-20 Thread Alvaro Herrera
Add PGDLLEXPORTS to some plpgsql function declarations After -fvisibility=hidden was added by 089480c07705, plpgsql_check no longer works; this quick hack fixes it. It would be better to restructure the plpgsql.h header so that this doesn't look as random, but we can leave that for another day.

Re: pgsql: Default to hidden visibility for extension libraries where possi

2022-07-19 Thread Alvaro Herrera
On 2022-Jul-19, Pavel Stehule wrote: > po 18. 7. 2022 v 3:06 odesílatel Andres Freund napsal: > > > Default to hidden visibility for extension libraries where possible > Unfortunately, this commit definitely breaks plpgsql_check. Can the > following routines be visible? Do you just need to

pgsql: Wrap overly long lines

2022-07-19 Thread Alvaro Herrera
Wrap overly long lines Reported by Richard Guo. Reviewed-by: Richard Guo Reviewed-by: Tom Lane Discussion: https://postgr.es/m/cambws4-3ywl_tphjkk-vvzr-tbar--b6xxggm8xe7vsg38a...@mail.gmail.com Branch -- master Details ---

pgsql: Plug memory leak

2022-07-13 Thread Alvaro Herrera
Plug memory leak Commit 054325c5eeb3 created a memory leak in PQsendQueryInternal in case an error occurs while sending the message. Repair. Backpatch to 14, like that commit. Reported by Coverity. Branch -- master Details ---

pgsql: Fix flag tests in src/test/modules/test_oat_hooks

2022-07-13 Thread Alvaro Herrera
Fix flag tests in src/test/modules/test_oat_hooks In what must have been a copy'n paste mistake, all the flag tests use the same flag rather than a different flag each. The bug is not suprising, considering that it's dead code; add a minimal, testimonial line to cover it. This is all pretty

pgsql: Plug memory leak

2022-07-13 Thread Alvaro Herrera
Plug memory leak Commit 054325c5eeb3 created a memory leak in PQsendQueryInternal in case an error occurs while sending the message. Repair. Backpatch to 14, like that commit. Reported by Coverity. Branch -- REL_14_STABLE Details ---

pgsql: Plug memory leak

2022-07-13 Thread Alvaro Herrera
Plug memory leak Commit 054325c5eeb3 created a memory leak in PQsendQueryInternal in case an error occurs while sending the message. Repair. Backpatch to 14, like that commit. Reported by Coverity. Branch -- REL_15_STABLE Details ---

pgsql: Fix XID list support some more

2022-07-13 Thread Alvaro Herrera
Fix XID list support some more Read/out support in 5ca0fe5c8ad7 was missing/incomplete, per Tom Lane. Again, as far as core is concerned, this is not only dead code but also untested; however, third parties may come to rely on it, so the standard features should work. Discussion:

Re: pgsql: Fix for make unportability

2022-07-13 Thread Alvaro Herrera
On 2022-Jul-13, Peter Eisentraut wrote: > Fix for make unportability > > 88dad06b47eb80f699211c9b0b7a1c6d9016ad19 contains a make $(shell) > construct that apparently confuses older GNU make versions (possibly > because of the # inside the shell command?). This construct, which > would allow #

Re: pgsql: Add copy/equal support for XID lists

2022-07-12 Thread Alvaro Herrera
seDB.com/ "La vida es para el que se aventura" >From d4dd486849c7c613dfc98cf0d7a3986dd0af4e25 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 12 Jul 2022 16:48:39 +0200 Subject: [PATCH] Fix XID list support some more Read/out support in 5ca0fe5c8ad7 was missing/incomplete, p

pgsql: Add copy/equal support for XID lists

2022-07-12 Thread Alvaro Herrera
Add copy/equal support for XID lists Commit f10a025cfe97 added support for List to store Xids, but didn't handle the new type in all cases. Add some obviously necessary pieces. As far as I am aware, this is all dead code as far as core code is concerned, but it seems unacceptable not to have it

pgsql: libpq: Improve idle state handling in pipeline mode

2022-07-05 Thread Alvaro Herrera
libpq: Improve idle state handling in pipeline mode We were going into IDLE state too soon when executing queries via PQsendQuery in pipeline mode, causing several scenarios to misbehave in different ways -- most notably, as reported by Daniele Varrazzo, that a warning message is produced by

pgsql: libpq: Improve idle state handling in pipeline mode

2022-07-05 Thread Alvaro Herrera
libpq: Improve idle state handling in pipeline mode We were going into IDLE state too soon when executing queries via PQsendQuery in pipeline mode, causing several scenarios to misbehave in different ways -- most notably, as reported by Daniele Varrazzo, that a warning message is produced by

pgsql: libpq: Improve idle state handling in pipeline mode

2022-07-05 Thread Alvaro Herrera
libpq: Improve idle state handling in pipeline mode We were going into IDLE state too soon when executing queries via PQsendQuery in pipeline mode, causing several scenarios to misbehave in different ways -- most notably, as reported by Daniele Varrazzo, that a warning message is produced by

pgsql: BRIN: improve documentation on summarization

2022-07-05 Thread Alvaro Herrera
BRIN: improve documentation on summarization The existing wording wasn't clear enough and some details weren't anywhere, such as the fact that autosummarization is off by default. Improve. Authors: Roberto Mello, Jaime Casanova, Justin Pryzby, Álvaro Herrera Discussion:

pgsql: BRIN: improve documentation on summarization

2022-07-05 Thread Alvaro Herrera
BRIN: improve documentation on summarization The existing wording wasn't clear enough and some details weren't anywhere, such as the fact that autosummarization is off by default. Improve. Authors: Roberto Mello, Jaime Casanova, Justin Pryzby, Álvaro Herrera Discussion:

pgsql: BRIN: improve documentation on summarization

2022-07-05 Thread Alvaro Herrera
BRIN: improve documentation on summarization The existing wording wasn't clear enough and some details weren't anywhere, such as the fact that autosummarization is off by default. Improve. Authors: Roberto Mello, Jaime Casanova, Justin Pryzby, Álvaro Herrera Discussion:

pgsql: BRIN: improve documentation on summarization

2022-07-05 Thread Alvaro Herrera
BRIN: improve documentation on summarization The existing wording wasn't clear enough and some details weren't anywhere, such as the fact that autosummarization is off by default. Improve. Authors: Roberto Mello, Jaime Casanova, Justin Pryzby, Álvaro Herrera Discussion:

pgsql: BRIN: improve documentation on summarization

2022-07-05 Thread Alvaro Herrera
BRIN: improve documentation on summarization The existing wording wasn't clear enough and some details weren't anywhere, such as the fact that autosummarization is off by default. Improve. Authors: Roberto Mello, Jaime Casanova, Justin Pryzby, Álvaro Herrera Discussion:

pgsql: Implement List support for TransactionId

2022-07-04 Thread Alvaro Herrera
Implement List support for TransactionId Use it for RelationSyncEntry->streamed_txns, which is currently using an integer list. The API support is not complete, not because it is hard to write but because it's unclear that it's worth the code space, there being so little use of XID lists.

pgsql: Link to MVCC docs in MERGE docs

2022-06-15 Thread Alvaro Herrera
Link to MVCC docs in MERGE docs In addition, this moves the new paragraph in the MVCC page upwards, for a more consistent flow; some minor markup mistakes, style issues and typos are fixed too. Per comments from Justin Pryzby. Discussion: https://postgr.es/m/20220511163350.gl19...@telsasoft.com

pgsql: Revert changes to CONCURRENTLY that "sped up" Xmin advance

2022-05-31 Thread Alvaro Herrera
Revert changes to CONCURRENTLY that "sped up" Xmin advance This reverts commit d9d076222f5b "VACUUM: ignore indexing operations with CONCURRENTLY". These changes caused indexes created with the CONCURRENTLY option to miss heap tuples that were HOT-updated and HOT-pruned during the index

pgsql: Revert changes to CONCURRENTLY that "sped up" Xmin advance

2022-05-31 Thread Alvaro Herrera
Revert changes to CONCURRENTLY that "sped up" Xmin advance This reverts commit d9d076222f5b "VACUUM: ignore indexing operations with CONCURRENTLY". These changes caused indexes created with the CONCURRENTLY option to miss heap tuples that were HOT-updated and HOT-pruned during the index

pgsql: Fix mis-merge of result file

2022-05-20 Thread Alvaro Herrera
Fix mis-merge of result file Failed to "git add" this file in this branch. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8c47622bb36972a95cf3789217bf33b2d18a00ce Modified Files -- src/test/regress/expected/event_trigger.out | 2 ++ 1 file

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër

pgsql: Fix DDL deparse of CREATE OPERATOR CLASS

2022-05-20 Thread Alvaro Herrera
Fix DDL deparse of CREATE OPERATOR CLASS When an implicit operator family is created, it wasn't getting reported. Make it do so. This has always been missing. Backpatch to 10. Author: Masahiko Sawada Reported-by: Leslie LEMAIRE Reviewed-by: Amit Kapila Reviewed-by: Michael Paquiër

pgsql: Backpatch regression tests added by 2d689babe3cb

2022-05-20 Thread Alvaro Herrera
Backpatch regression tests added by 2d689babe3cb A new plpgsql test function was added in 14 and up to cover for a bugfix that was not backpatchable. We can add it to older versions as a way to cover other bits of DDL event triggers, with an exception clause to avoid the problematic corner case.

pgsql: Backpatch regression tests added by 2d689babe3cb

2022-05-20 Thread Alvaro Herrera
Backpatch regression tests added by 2d689babe3cb A new plpgsql test function was added in 14 and up to cover for a bugfix that was not backpatchable. We can add it to older versions as a way to cover other bits of DDL event triggers, with an exception clause to avoid the problematic corner case.

pgsql: Backpatch regression tests added by 2d689babe3cb

2022-05-20 Thread Alvaro Herrera
Backpatch regression tests added by 2d689babe3cb A new plpgsql test function was added in 14 and up to cover for a bugfix that was not backpatchable. We can add it to older versions as a way to cover other bits of DDL event triggers, with an exception clause to avoid the problematic corner case.

pgsql: Backpatch regression tests added by 2d689babe3cb

2022-05-20 Thread Alvaro Herrera
Backpatch regression tests added by 2d689babe3cb A new plpgsql test function was added in 14 and up to cover for a bugfix that was not backpatchable. We can add it to older versions as a way to cover other bits of DDL event triggers, with an exception clause to avoid the problematic corner case.

pgsql: doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY

2022-05-20 Thread Alvaro Herrera
doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY It wasn't previously mentioned that the index is created as invalid, which is confusing to new users. Backpatch to 14 (only because of a conflict in 13). Author: Laurenz Albe Reported-by: Lauren Fliksteen Reviewed-by:

pgsql: doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY

2022-05-20 Thread Alvaro Herrera
doc: Explain 'invalid' index state for CREATE INDEX CONCURRENTLY It wasn't previously mentioned that the index is created as invalid, which is confusing to new users. Backpatch to 14 (only because of a conflict in 13). Author: Laurenz Albe Reported-by: Lauren Fliksteen Reviewed-by:

pgsql: Repurpose PROC_COPYABLE_FLAGS as PROC_XMIN_FLAGS

2022-05-19 Thread Alvaro Herrera
Repurpose PROC_COPYABLE_FLAGS as PROC_XMIN_FLAGS This is a slight, convenient semantics change from what commit 0f0cfb494004 ("Fix parallel operations that prevent oldest xmin from advancing") introduced that lets us simplify the coding in the one place where it is used. Backpatch to 13. This

pgsql: Repurpose PROC_COPYABLE_FLAGS as PROC_XMIN_FLAGS

2022-05-19 Thread Alvaro Herrera
Repurpose PROC_COPYABLE_FLAGS as PROC_XMIN_FLAGS This is a slight, convenient semantics change from what commit 0f0cfb494004 ("Fix parallel operations that prevent oldest xmin from advancing") introduced that lets us simplify the coding in the one place where it is used. Backpatch to 13. This

pgsql: Repurpose PROC_COPYABLE_FLAGS as PROC_XMIN_FLAGS

2022-05-19 Thread Alvaro Herrera
Repurpose PROC_COPYABLE_FLAGS as PROC_XMIN_FLAGS This is a slight, convenient semantics change from what commit 0f0cfb494004 ("Fix parallel operations that prevent oldest xmin from advancing") introduced that lets us simplify the coding in the one place where it is used. Backpatch to 13. This

pgsql: Update xml_1.out and xml_2.out

2022-05-18 Thread Alvaro Herrera
Update xml_1.out and xml_2.out Commit 0fbf01120023 should have updated them but didn't. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5139db55636bc39c06232ada1b195f7d5d6950e0 Modified Files -- src/test/regress/expected/xml_1.out | 3 +++

pgsql: Update xml_1.out and xml_2.out

2022-05-18 Thread Alvaro Herrera
Update xml_1.out and xml_2.out Commit 0fbf01120023 should have updated them but didn't. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e8b93c6e2810306887dc8477aab88ae08cf335f9 Modified Files -- src/test/regress/expected/xml_1.out | 3 +++

pgsql: Update xml_1.out and xml_2.out

2022-05-18 Thread Alvaro Herrera
Update xml_1.out and xml_2.out Commit 0fbf01120023 should have updated them but didn't. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0ebd20e20ff48a5df16ebfa49947c4044b948fa8 Modified Files -- src/test/regress/expected/xml_1.out | 3 +++

pgsql: Update xml_1.out and xml_2.out

2022-05-18 Thread Alvaro Herrera
Update xml_1.out and xml_2.out Commit 0fbf01120023 should have updated them but didn't. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/50bf3157a1a5cd7196ba5b5feaca4b71e035afb4 Modified Files -- src/test/regress/expected/xml_1.out | 3 +++

pgsql: Update xml_1.out and xml_2.out

2022-05-18 Thread Alvaro Herrera
Update xml_1.out and xml_2.out Commit 0fbf01120023 should have updated them but didn't. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/62221ef187b0098c8f331f804b7c63859e5ee6ff Modified Files -- src/test/regress/expected/xml_1.out | 3 +++

pgsql: Update xml_1.out and xml_2.out

2022-05-18 Thread Alvaro Herrera
Update xml_1.out and xml_2.out Commit 0fbf01120023 should have updated them but didn't. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/29d11151875fb7b4c76ac7b03444dcd7b4a8597f Modified Files -- src/test/regress/expected/xml_1.out | 3 +++

Re: pgsql: Check column list length in XMLTABLE/JSON_TABLE alias

2022-05-18 Thread Alvaro Herrera
On 2022-May-18, Tom Lane wrote: > Alvaro Herrera writes: > > Check column list length in XMLTABLE/JSON_TABLE alias > > Per buildfarm, you forgot to update xml_1.out and xml_2.out. Sigh. Will fix. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.

pgsql: Fix EXPLAIN MERGE output when no tuples are processed

2022-05-18 Thread Alvaro Herrera
Fix EXPLAIN MERGE output when no tuples are processed An 'else' clause was misplaced in commit 598ac10be1c2, making zero-rows output look a bit silly. Add a test case for it. Pointed out by Tom Lane. Discussion: https://postgr.es/m/21030.1652893...@sss.pgh.pa.us Branch -- master Details

pgsql: Check column list length in XMLTABLE/JSON_TABLE alias

2022-05-18 Thread Alvaro Herrera
Check column list length in XMLTABLE/JSON_TABLE alias We weren't checking the length of the column list in the alias clause of an XMLTABLE or JSON_TABLE function (a "tablefunc" RTE), and it was possible to make the server crash by passing an overly long one. Fix it by throwing an error in that

pgsql: Check column list length in XMLTABLE/JSON_TABLE alias

2022-05-18 Thread Alvaro Herrera
Check column list length in XMLTABLE/JSON_TABLE alias We weren't checking the length of the column list in the alias clause of an XMLTABLE or JSON_TABLE function (a "tablefunc" RTE), and it was possible to make the server crash by passing an overly long one. Fix it by throwing an error in that

pgsql: Check column list length in XMLTABLE/JSON_TABLE alias

2022-05-18 Thread Alvaro Herrera
Check column list length in XMLTABLE/JSON_TABLE alias We weren't checking the length of the column list in the alias clause of an XMLTABLE or JSON_TABLE function (a "tablefunc" RTE), and it was possible to make the server crash by passing an overly long one. Fix it by throwing an error in that

pgsql: Check column list length in XMLTABLE/JSON_TABLE alias

2022-05-18 Thread Alvaro Herrera
Check column list length in XMLTABLE/JSON_TABLE alias We weren't checking the length of the column list in the alias clause of an XMLTABLE or JSON_TABLE function (a "tablefunc" RTE), and it was possible to make the server crash by passing an overly long one. Fix it by throwing an error in that

pgsql: Check column list length in XMLTABLE/JSON_TABLE alias

2022-05-18 Thread Alvaro Herrera
Check column list length in XMLTABLE/JSON_TABLE alias We weren't checking the length of the column list in the alias clause of an XMLTABLE or JSON_TABLE function (a "tablefunc" RTE), and it was possible to make the server crash by passing an overly long one. Fix it by throwing an error in that

pgsql: Check column list length in XMLTABLE/JSON_TABLE alias

2022-05-18 Thread Alvaro Herrera
Check column list length in XMLTABLE/JSON_TABLE alias We weren't checking the length of the column list in the alias clause of an XMLTABLE or JSON_TABLE function (a "tablefunc" RTE), and it was possible to make the server crash by passing an overly long one. Fix it by throwing an error in that

pgsql: Make EXPLAIN MERGE output format more compact

2022-05-18 Thread Alvaro Herrera
Make EXPLAIN MERGE output format more compact We can use a single line to print all tuple counts that MERGE processed, for conciseness, and elide those that are zeroes. Non-text formats report all numbers, as is typical. Per comment from Justin Pryzby Discussion:

pgsql: Add link to HBA docs in initdb --auth documentation

2022-05-14 Thread Alvaro Herrera
Add link to HBA docs in initdb --auth documentation Reaction to a suggestion from jheb...@micron.com, though this doesn't directly address the complaint. Discussion: https://postgr.es/m/165117307860.683.10308862820133754...@wrigleys.postgresql.org Branch -- master Details ---

pgsql: Add link to initdb in pg_hba.conf docs

2022-05-14 Thread Alvaro Herrera
Add link to initdb in pg_hba.conf docs Suggested by David G. Johnston Discussion: https://postgr.es/m/CAKFQuwYK4OqwoHscZi3yws-urv3NvVfoKHessyso5D=5qqc...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dce7072e5106456a1f1f003c2fcc2d7901ab89d8

pgsql: Clean up newlines following left parentheses

2022-05-13 Thread Alvaro Herrera
Clean up newlines following left parentheses Like commit c9d297751959. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c4f113e8fef900e9e7e7c77a3a21db1535e5be72 Modified Files -- src/backend/executor/nodeAgg.c | 4 ++--

pgsql: Drop unlogged table after test is done

2022-04-25 Thread Alvaro Herrera
Drop unlogged table after test is done Another test is constructed on top of regression tests, which does not work correctly with unlogged tables. For now, cope with that by making sure no unlogged table is left behind. Per buildfarm pink after 4fb5c794e586. Branch -- master Details

pgsql: Cover brin/gin/gist/spgist ambuildempty routines in regression t

2022-04-25 Thread Alvaro Herrera
Cover brin/gin/gist/spgist ambuildempty routines in regression tests Changing some TEMP or permanent tables to UNLOGGED is sufficient to invoke these ambuildempty routines, which were all not uncovered by any tests. These changes do not otherwise affect the test suite. Author: Amul Sul

pgsql: Always pfree strings returned by GetDatabasePath

2022-04-25 Thread Alvaro Herrera
Always pfree strings returned by GetDatabasePath Several places didn't do it, and in many cases it didn't matter because it would be a small allocation in a short-lived context; but other places may accumulate a few (for example, in CreateDatabaseUsingFileCopy, one per tablespace). In most

pgsql: Standardize references to Zstandard as

2022-04-21 Thread Alvaro Herrera
Standardize references to Zstandard as Some places used ZSTD, which isn't widely used anywhere. Use ZSTD only to refer to the environment variable; use zstd (all lowercase) to refer to the utility. Per complaint from Justin Pryzby. Discussion:

pgsql: CREATE PUBLICATION ref: Minor tweaks to row filters

2022-04-21 Thread Alvaro Herrera
CREATE PUBLICATION ref: Minor tweaks to row filters Prompted by a complaint from Justin Pryzby. Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/20220414003301.gt26...@telsasoft.com Branch -- master Details ---

pgsql: set_deparse_plan: Reuse variable to appease Coverity

2022-04-20 Thread Alvaro Herrera
set_deparse_plan: Reuse variable to appease Coverity Coverity complains that dpns->outer_plan is deferenced (to obtain ->targetlist) when possibly NULL. We can avoid this by using dpns->outer_tlist instead, which was already obtained a few lines up. The fact that we end up with

pgsql: Move ModifyTableContext->lockmode to UpdateContext

2022-04-20 Thread Alvaro Herrera
Move ModifyTableContext->lockmode to UpdateContext Should have been done this way to start with, but I failed to notice This way we avoid some pointless initialization, and better contains the variable to exist in the scope where it is really used. Reviewed-by: Michaël Paquier Discussion:

pgsql: ExecModifyTable: use context.planSlot instead of planSlot

2022-04-20 Thread Alvaro Herrera
ExecModifyTable: use context.planSlot instead of planSlot There's no reason to keep a separate local variable when we have a place for it elsewhere. This allows to simplify some code. Reviewed-by: Michaël Paquier Discussion: https://postgr.es/m/202204191345.qerjy3kxi3eb@alvherre.pgsql Branch

pgsql: Have CLUSTER ignore partitions not owned by caller

2022-04-14 Thread Alvaro Herrera
Have CLUSTER ignore partitions not owned by caller If a partitioned table has partitions owned by roles other than the owner of the partitioned table, don't include them in the to-be- clustered list. This is similar to what VACUUM FULL does (except we do it sooner, because there is no reason to

pgsql: Reword text on ROW SHARE lock as acquired by SELECT FOR

2022-04-14 Thread Alvaro Herrera
Reword text on ROW SHARE lock as acquired by SELECT FOR It was missing lock levels FOR KEY SHARE and FOR NO KEY EXCLUSIVE; but also SELECT FOR UPDATE is not a command separate from SELECT, as the original text implied. It is clearer to state that FOR is an option of regular SELECT. Per

pgsql: Remove extraneous blank lines before block-closing braces

2022-04-13 Thread Alvaro Herrera
Remove extraneous blank lines before block-closing braces These are useless and distracting. We wouldn't have written the code with them to begin with, so there's no reason to keep them. Author: Justin Pryzby Discussion: https://postgr.es/m/20220411020336.gb26...@telsasoft.com Discussion:

pgsql: Release cache tuple when no longer needed

2022-04-13 Thread Alvaro Herrera
Release cache tuple when no longer needed There was a small buglet in commit 52e4f0cd472d whereby a tuple acquired from cache was not released, giving rise to WARNING messages; fix that. While at it, restructure the code a bit on stylistic grounds. Author: Hou zj Reported-by: Peter Smith

pgsql: adjust_partition_colnos mustn't be called if not needed

2022-04-12 Thread Alvaro Herrera
adjust_partition_colnos mustn't be called if not needed Add an assert to make this very explicit, as well as a code comment. The former should silence Coverity complaining about this. Introduced by 7103ebb7aae8. Reported-by: Ranier Vilela Discussion:

pgsql: Change mechanism to set up source targetlist in MERGE

2022-04-12 Thread Alvaro Herrera
Change mechanism to set up source targetlist in MERGE We were setting MERGE source subplan's targetlist by expanding the individual attributes of the source relation completely, early in the parse analysis phase. This failed to work when the condition of an action included a whole-row reference,

pgsql: Revert "Rewrite some RI code to avoid using SPI"

2022-04-07 Thread Alvaro Herrera
Revert "Rewrite some RI code to avoid using SPI" This reverts commit 99392cdd78b788295e52b9f4942fa11992fd5ba9. We'd rather rewrite ri_triggers.c as a whole rather than piecemeal. Discussion: https://postgr.es/m/e1ncxx2-000mft...@gemulon.postgresql.org Branch -- master Details ---

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