pgsql: Raise a WARNING for missing publications.

2022-03-30 Thread Amit Kapila
Raise a WARNING for missing publications. When we create or alter a subscription to add publications raise a warning for non-existent publications. We don't want to give an error here because it is possible that users can later create the missing publications. Author: Vignesh C Reviewed-by:

Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches

2022-03-30 Thread Andrew Dunstan
> On Mar 30, 2022, at 9:12 PM, Tom Lane wrote: > > Andrew Dunstan writes: On Mar 30, 2022, at 8:19 PM, Tom Lane wrote: >>> I think this means that its old Perl version misinterprets >>> use parent -norequire, qw(PostgreSQL::Test::Cluster); >>> as a request to include "parent.pm". Is

pgsql: Clean up some dead code in pg_dump with tar format and gzip comp

2022-03-30 Thread Michael Paquier
Clean up some dead code in pg_dump with tar format and gzip compression Compression with gzip has never been supported in the tar format of pg_dump since this code has been introduced in c3e18804, as the use of buffered I/O in gzdopen() changes the file positioning that tar requires. The

Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches

2022-03-30 Thread Tom Lane
Andrew Dunstan writes: >> On Mar 30, 2022, at 8:19 PM, Tom Lane wrote: >> I think this means that its old Perl version misinterprets >> use parent -norequire, qw(PostgreSQL::Test::Cluster); >> as a request to include "parent.pm". Is there a more >> backwards-compatible way to spell that? > Not

Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches

2022-03-30 Thread Andrew Dunstan
> On Mar 30, 2022, at 8:19 PM, Tom Lane wrote: > > Andrew Dunstan writes: >> Make PostgreSQL::Test::Cluster compatible with all live branches > > prairiedog is unhappy [1], seemingly as a result of this patch: > > t/001_repl_statsCan't locate parent.pm in @INC (@INC contains: >

Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches

2022-03-30 Thread Tom Lane
Andrew Dunstan writes: > Make PostgreSQL::Test::Cluster compatible with all live branches prairiedog is unhappy [1], seemingly as a result of this patch: t/001_repl_statsCan't locate parent.pm in @INC (@INC contains: ../../src/test/perl/ . /usr/local/perl5.8.3/lib/5.8.3/darwin-2level

pgsql: Add .gitignore for basebackup_to_shell.

2022-03-30 Thread Tom Lane
Add .gitignore for basebackup_to_shell. Nathan Bossart Discussion: https://postgr.es/m/20220330223531.GA134543@nathanxps13 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f8e0d900afed933d8f5d3f189fdb141924a8e518 Modified Files --

pgsql: Optimize order of GROUP BY keys

2022-03-30 Thread Tomas Vondra
Optimize order of GROUP BY keys When evaluating a query with a multi-column GROUP BY clause using sort, the cost may be heavily dependent on the order in which the keys are compared when building the groups. Grouping does not imply any ordering, so we're allowed to compare the keys in arbitrary

Re: pgsql: Add function to pump IPC process until string match

2022-03-30 Thread Daniel Gustafsson
> On 30 Mar 2022, at 18:09, Andres Freund wrote: >> Would adding back something like the (right now untested) below be what >> you're >> after? Looking at the perldoc I didn't see any other debugging aids we can >> emit other than the stream and type of error. > > I found showing the regex

pgsql: SQL JSON functions

2022-03-30 Thread Andrew Dunstan
SQL JSON functions This Patch introduces three SQL standard JSON functions: JSON() (incorrectly mentioned in my commit message for f4fb45d15c) JSON_SCALAR() JSON_SERIALIZE() JSON() produces json values from text, bytea, json or jsonb values, and has facilitites for handling duplicate keys.

pgsql: Fix possible NULL-pointer-deference in backup_compression.c.

2022-03-30 Thread Robert Haas
Fix possible NULL-pointer-deference in backup_compression.c. Per Coverity and Tom Lane. Reviewed by Tom Lane and Justin Pryzby. Discussion: http://postgr.es/m/384291.1648403...@sss.pgh.pa.us Branch -- master Details ---

pgsql: basebackup_to_shell: Add TAP test.

2022-03-30 Thread Robert Haas
basebackup_to_shell: Add TAP test. Per gripe from Andres Freund. Thanks to Andres Freund, Thomas Munro, and Andrew Dunstan for advice on how to make this test work even on Windows. Discussion: https://postgr.es/m/CA+Tgmoat+zbzzZQJ7poXyUwiqxQxTaUid=aub4fejz15vvd...@mail.gmail.com Branch --

pgsql: Document basebackup_to_shell.required_role.

2022-03-30 Thread Robert Haas
Document basebackup_to_shell.required_role. Omission noted by Joe Conway. Discussion: https://postgr.es/m/CA+Tgmoat+zbzzZQJ7poXyUwiqxQxTaUid=aub4fejz15vvd...@mail.gmail.com Discussion: https://postgr.es/m/744cf762-47d3-050f-5fa1-d4f9e8dba...@joeconway.com Branch -- master Details ---

pgsql: Add range_agg with multirange inputs

2022-03-30 Thread Peter Eisentraut
Add range_agg with multirange inputs range_agg for normal ranges already existed. A lot of code can be shared. Author: Paul Jungwirth Reviewed-by: Chapman Flack Discussion: https://www.postgresql.org/message-id/flat/007ef255-35ef-fd26-679c-f97e7a7f3...@illuminatedcomputing.com Branch --

pgsql: ci: enable zstd where available.

2022-03-30 Thread Andres Freund
ci: enable zstd where available. Since zstd is now used in a bunch of places, enable it in CI. The windows image unfortunately doesn't yet contain zstd, so it's not enabled there. Discussion: https://postgr.es/m/20220330155017.lfnlzt3m42nk7...@alap3.anarazel.de Branch -- master Details

Re: pgsql: Add function to pump IPC process until string match

2022-03-30 Thread Andres Freund
Hi, On 2022-03-30 09:10:17 +0200, Daniel Gustafsson wrote: > > On 30 Mar 2022, at 00:58, Andres Freund wrote: > > On 2022-02-23 13:32:03 +, Daniel Gustafsson wrote: > > >> Add function to pump IPC process until string match > >> > >> Refactor the recovery tests to not carry a local

pgsql: Change some internal error messages to elogs

2022-03-30 Thread Peter Eisentraut
Change some internal error messages to elogs Author: Paul Jungwirth Reviewed-by: Chapman Flack Discussion: https://www.postgresql.org/message-id/flat/007ef255-35ef-fd26-679c-f97e7a7f3...@illuminatedcomputing.com Branch -- master Details ---

pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches

2022-03-30 Thread Andrew Dunstan
Make PostgreSQL::Test::Cluster compatible with all live branches We do this via a subclass for any branch older than the minimum known to be compatible with the main package (currently release 12). This should be useful for constructing cross-version tests. In theory this could be extended back

pgsql: Additional tests for range_intersect_agg(anymultirange)

2022-03-30 Thread Peter Eisentraut
Additional tests for range_intersect_agg(anymultirange) Author: Paul Jungwirth Reviewed-by: Chapman Flack Discussion: https://www.postgresql.org/message-id/flat/007ef255-35ef-fd26-679c-f97e7a7f3...@illuminatedcomputing.com Branch -- master Details ---

pgsql: doc: Document range_intersect_agg(anymultirange)

2022-03-30 Thread Peter Eisentraut
doc: Document range_intersect_agg(anymultirange) It already existed but was not mentioned in the documentation. (Only the anyrange variant was listed.) Author: Paul Jungwirth Reviewed-by: Chapman Flack Discussion:

pgsql: Allow parallel zstd compression when taking a base backup.

2022-03-30 Thread Robert Haas
Allow parallel zstd compression when taking a base backup. libzstd allows transparent parallel compression just by setting an option when creating the compression context, so permit that for both client and server-side backup compression. To use this, use something like pg_basebackup --compress

pgsql: Simplify a needlessly-complicated regular expression.

2022-03-30 Thread Robert Haas
Simplify a needlessly-complicated regular expression. Dilip Kumar Discussion: https://postgr.es/m/cafitn-uv_u1lgbn_caigyfgpxp+bfbuvqg5mz24nqc8e_yb...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c6863b85829149e2241faafa161b6c5af1f06cb9 Modified

pgsql: doc: Clarify when SSL actually means TLS

2022-03-30 Thread Daniel Gustafsson
doc: Clarify when SSL actually means TLS SSL has become the de facto term to mean an end-to-end encrypted channel regardless of protocol used, even though the SSL protocol is deprecated. Clarify what we mean with SSL in our documentation, especially for new users who might be looking for TLS.

Re: pgsql: Add function to pump IPC process until string match

2022-03-30 Thread Alvaro Herrera
On 2022-Mar-30, Daniel Gustafsson wrote: > Would adding back something like the (right now untested) below be what you're > after? Looking at the perldoc I didn't see any other debugging aids we can > emit other than the stream and type of error. I think you could also show the $until that

pgsql: Fix typo in comment.

2022-03-30 Thread Etsuro Fujita
Fix typo in comment. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/81fd8085de0974e0d4ed932d8dd861a159eb279d Modified Files -- src/backend/commands/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in comment.

2022-03-30 Thread Etsuro Fujita
Fix typo in comment. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/166f143869c98492a41288bf8175521cd9ce7c24 Modified Files -- src/backend/commands/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in comment.

2022-03-30 Thread Etsuro Fujita
Fix typo in comment. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f042dc6a415decc4e2a9707de5f3fc737e42e1ed Modified Files -- src/backend/commands/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in comment.

2022-03-30 Thread Etsuro Fujita
Fix typo in comment. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f505bec711f602c6bd08a88e8ad894b611e7e8a1 Modified Files -- src/backend/commands/copyfrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in comment.

2022-03-30 Thread Etsuro Fujita
Fix typo in comment. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0598bed99efa6e2d5fa43bbccbcca0358c6e1e75 Modified Files -- src/backend/commands/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in comment.

2022-03-30 Thread Etsuro Fujita
Fix typo in comment. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/637afee327f4690afc3f16fd76123cd4b7af1d95 Modified Files -- src/backend/commands/copyfrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: pgsql: Add function to pump IPC process until string match

2022-03-30 Thread Daniel Gustafsson
> On 30 Mar 2022, at 00:58, Andres Freund wrote: > On 2022-02-23 13:32:03 +, Daniel Gustafsson wrote: >> Add function to pump IPC process until string match >> >> Refactor the recovery tests to not carry a local duplicated copy of >> the pump_until function which pumps a process until a

pgsql: Add header matching mode to COPY FROM

2022-03-30 Thread Peter Eisentraut
Add header matching mode to COPY FROM COPY FROM supports the HEADER option to silently discard the header line from a CSV or text file. It is possible to load by mistake a file that matches the expected format, for example, if two text columns have been swapped, resulting in garbage in the