Re: pgsql: Allow root-owned SSL private keys in libpq, not only the backend

2022-03-31 Thread Peter Eisentraut
On 02.03.22 17:57, Tom Lane wrote: Allow root-owned SSL private keys in libpq, not only the backend. This change makes libpq apply the same private-key-file ownership and permissions checks that we have used in the backend since commit 9a83564c5. Namely, that the private key can be owned by eit

pgsql: Add diagnostic output on error in pump_until

2022-03-31 Thread Daniel Gustafsson
Add diagnostic output on error in pump_until When pump_until was moved to Utils.pm in commit 6da65a3f9 the diag calls were removed, this puts them back. Per request from Andres Freund. Discussion: https://postgr.es/m/20220329225819.ahk5u2tax3ez6...@alap3.anarazel.de Branch -- master Detai

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

2022-03-31 Thread Andrew Dunstan
On 3/30/22 21:12, 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 there a more >>> backw

pgsql: doc: Fix typo in ANALYZE documentation

2022-03-31 Thread Daniel Gustafsson
doc: Fix typo in ANALYZE documentation Commit 61fa6ca79b3 accidentally wrote constrast instead of contrast. Backpatch-through: 10 Discussion: https://postgr.es/m/88903179-5ce2-3d4d-af43-7830372bd...@enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/

pgsql: doc: Fix typo in ANALYZE documentation

2022-03-31 Thread Daniel Gustafsson
doc: Fix typo in ANALYZE documentation Commit 61fa6ca79b3 accidentally wrote constrast instead of contrast. Backpatch-through: 10 Discussion: https://postgr.es/m/88903179-5ce2-3d4d-af43-7830372bd...@enterprisedb.com Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/comm

pgsql: doc: Fix typo in ANALYZE documentation

2022-03-31 Thread Daniel Gustafsson
doc: Fix typo in ANALYZE documentation Commit 61fa6ca79b3 accidentally wrote constrast instead of contrast. Backpatch-through: 10 Discussion: https://postgr.es/m/88903179-5ce2-3d4d-af43-7830372bd...@enterprisedb.com Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/comm

pgsql: doc: Fix typo in ANALYZE documentation

2022-03-31 Thread Daniel Gustafsson
doc: Fix typo in ANALYZE documentation Commit 61fa6ca79b3 accidentally wrote constrast instead of contrast. Backpatch-through: 10 Discussion: https://postgr.es/m/88903179-5ce2-3d4d-af43-7830372bd...@enterprisedb.com Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/comm

pgsql: doc: Fix typo in ANALYZE documentation

2022-03-31 Thread Daniel Gustafsson
doc: Fix typo in ANALYZE documentation Commit 61fa6ca79b3 accidentally wrote constrast instead of contrast. Backpatch-through: 10 Discussion: https://postgr.es/m/88903179-5ce2-3d4d-af43-7830372bd...@enterprisedb.com Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/comm

pgsql: doc: Fix typo in ANALYZE documentation

2022-03-31 Thread Daniel Gustafsson
doc: Fix typo in ANALYZE documentation Commit 61fa6ca79b3 accidentally wrote constrast instead of contrast. Backpatch-through: 10 Discussion: https://postgr.es/m/88903179-5ce2-3d4d-af43-7830372bd...@enterprisedb.com Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/comm

pgsql: Fix comment typo in PotsgreSQL::Test::Cluster module

2022-03-31 Thread Andrew Dunstan
Fix comment typo in PotsgreSQL::Test::Cluster module Per Dagfinn Ilmari Mannsåker Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ddee016b342cddcfb97325afac0a65c502932e5f Modified Files -- src/test/perl/PostgreSQL/Test/Cluster.pm | 2 +- 1 file changed,

Re: pgsql: Allow root-owned SSL private keys in libpq, not only the backend

2022-03-31 Thread Tom Lane
Peter Eisentraut writes: > I think this > libpq_gettext("private key file \"%s\" is not a regular file"), > should have a trailing newline in the string. Thanks, will fix. regards, tom lane

pgsql: psql: Add tests for \errverbose

2022-03-31 Thread Peter Eisentraut
psql: Add tests for \errverbose This is another piece of functionality that happens while a user query is being sent and which did not have any test coverage. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d3ab618290543017402b3bec9d36dde881becb18 Modified Files --

pgsql: Add missing newline in one libpq error message.

2022-03-31 Thread Tom Lane
Add missing newline in one libpq error message. Oversight in commit a59c79564. Back-patch, as that was. Noted by Peter Eisentraut. Discussion: https://postgr.es/m/7f85ef6d-250b-f5ec-9867-89f0b16d0...@enterprisedb.com Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: Add missing newline in one libpq error message.

2022-03-31 Thread Tom Lane
Add missing newline in one libpq error message. Oversight in commit a59c79564. Back-patch, as that was. Noted by Peter Eisentraut. Discussion: https://postgr.es/m/7f85ef6d-250b-f5ec-9867-89f0b16d0...@enterprisedb.com Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: Add missing newline in one libpq error message.

2022-03-31 Thread Tom Lane
Add missing newline in one libpq error message. Oversight in commit a59c79564. Back-patch, as that was. Noted by Peter Eisentraut. Discussion: https://postgr.es/m/7f85ef6d-250b-f5ec-9867-89f0b16d0...@enterprisedb.com Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: Add missing newline in one libpq error message.

2022-03-31 Thread Tom Lane
Add missing newline in one libpq error message. Oversight in commit a59c79564. Back-patch, as that was. Noted by Peter Eisentraut. Discussion: https://postgr.es/m/7f85ef6d-250b-f5ec-9867-89f0b16d0...@enterprisedb.com Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: Add missing newline in one libpq error message.

2022-03-31 Thread Tom Lane
Add missing newline in one libpq error message. Oversight in commit a59c79564. Back-patch, as that was. Noted by Peter Eisentraut. Discussion: https://postgr.es/m/7f85ef6d-250b-f5ec-9867-89f0b16d0...@enterprisedb.com Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/co

pgsql: Add missing newline in one libpq error message.

2022-03-31 Thread Tom Lane
Add missing newline in one libpq error message. Oversight in commit a59c79564. Back-patch, as that was. Noted by Peter Eisentraut. Discussion: https://postgr.es/m/7f85ef6d-250b-f5ec-9867-89f0b16d0...@enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdif

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

2022-03-31 Thread Tom Lane
Andrew Dunstan writes: > There are three ways out of this that I can see: > . carry a copy of parent.pm in src/test/perl (It's very small) > . use the older and heavier 'base' module which goes back to 5.004, and > does much the same thing (and a lot more) > . just do directly what parent.pm's imp

pgsql: psql: Refactor SendQuery()

2022-03-31 Thread Peter Eisentraut
psql: Refactor SendQuery() This breaks out the fetch-it-all-and-print case in SendQuery() into a separate function. This makes the code more similar to the other cases \gdesc and run query with FETCH_COUNT, and makes SendQuery() itself a bit smaller. Extracted from a larger patch with more chang

pgsql: In basebackup_to_shell tests, properly set up pg_hba.conf.

2022-03-31 Thread Robert Haas
In basebackup_to_shell tests, properly set up pg_hba.conf. Discussion: http://postgr.es/m/485495.1648692...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fea1cc49e4abca7eeb9bb9dd02d7d78abbd8d045 Modified Files -- contrib/basebackup_to_sh

pgsql: Remove use of perl parent module in Cluster.pm

2022-03-31 Thread Andrew Dunstan
Remove use of perl parent module in Cluster.pm Commit fb16d2c658 used the old but not quite old enough parent module, which dates to perl version 5.10.1 as a core module. We still have a dinosaur or two running older versions of perl, so rather than require an upgrade in those we simply do in plac

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

2022-03-31 Thread Andrew Dunstan
On 3/31/22 12:50, Tom Lane wrote: > Andrew Dunstan writes: >> There are three ways out of this that I can see: >> . carry a copy of parent.pm in src/test/perl (It's very small) >> . use the older and heavier 'base' module which goes back to 5.004, and >> does much the same thing (and a lot more)

pgsql: Print information about type of test and subdirectory before run

2022-03-31 Thread Andres Freund
Print information about type of test and subdirectory before running tests. When testing check-world it's hard to know what the test the test failure output belongs to. The tap test output is especially problematic, partially due to our practice of reusing test names like 001_basic.pl. This isn't

pgsql: Fix postgres_fdw to check shippability of sort clauses properly.

2022-03-31 Thread Tom Lane
Fix postgres_fdw to check shippability of sort clauses properly. postgres_fdw would push ORDER BY clauses to the remote side without verifying that the sort operator is safe to ship. Moreover, it failed to print a suitable USING clause if the sort operator isn't default for the sort expression's

pgsql: Fix postgres_fdw to check shippability of sort clauses properly.

2022-03-31 Thread Tom Lane
Fix postgres_fdw to check shippability of sort clauses properly. postgres_fdw would push ORDER BY clauses to the remote side without verifying that the sort operator is safe to ship. Moreover, it failed to print a suitable USING clause if the sort operator isn't default for the sort expression's

pgsql: Fix postgres_fdw to check shippability of sort clauses properly.

2022-03-31 Thread Tom Lane
Fix postgres_fdw to check shippability of sort clauses properly. postgres_fdw would push ORDER BY clauses to the remote side without verifying that the sort operator is safe to ship. Moreover, it failed to print a suitable USING clause if the sort operator isn't default for the sort expression's

pgsql: Fix postgres_fdw to check shippability of sort clauses properly.

2022-03-31 Thread Tom Lane
Fix postgres_fdw to check shippability of sort clauses properly. postgres_fdw would push ORDER BY clauses to the remote side without verifying that the sort operator is safe to ship. Moreover, it failed to print a suitable USING clause if the sort operator isn't default for the sort expression's

pgsql: Fix postgres_fdw to check shippability of sort clauses properly.

2022-03-31 Thread Tom Lane
Fix postgres_fdw to check shippability of sort clauses properly. postgres_fdw would push ORDER BY clauses to the remote side without verifying that the sort operator is safe to ship. Moreover, it failed to print a suitable USING clause if the sort operator isn't default for the sort expression's

pgsql: Fix postgres_fdw to check shippability of sort clauses properly.

2022-03-31 Thread Tom Lane
Fix postgres_fdw to check shippability of sort clauses properly. postgres_fdw would push ORDER BY clauses to the remote side without verifying that the sort operator is safe to ship. Moreover, it failed to print a suitable USING clause if the sort operator isn't default for the sort expression's

pgsql: initdb: When running CREATE DATABASE, use STRATEGY = WAL_COPY.

2022-03-31 Thread Robert Haas
initdb: When running CREATE DATABASE, use STRATEGY = WAL_COPY. Dilip Kumar, reviewed by Andres Freund and by me. Discussion: http://postgr.es/m/20220330011757.wr544o5y5my7s...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ad43a413c4f7f5d024a5b2f

pgsql: RETURNING clause for JSON() and JSON_SCALAR()

2022-03-31 Thread Andrew Dunstan
RETURNING clause for JSON() and JSON_SCALAR() This patch is extracted from a larger patch that allowed setting the default returned value from these functions to json or jsonb. That had problems, but this piece of it is fine. For these functions only json or jsonb can be specified in the RETURNING

pgsql: Fix comments with "a expression"

2022-03-31 Thread Andrew Dunstan
Fix comments with "a expression" Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9f91344223aad903ff70301f40183691a89f6cd4 Modified Files -- src/backend/optimizer/path/equivclass.c | 2 +- src/backend/parser/parse_expr.c | 2 +- 2 files changed, 2 i

pgsql: Expose a few more PL/pgSQL functions to debugger plugins.

2022-03-31 Thread Tom Lane
Expose a few more PL/pgSQL functions to debugger plugins. Add exec_assign_value, exec_eval_datum, and exec_cast_value to the set of functions a PL/pgSQL debugger plugin can conveniently call. This allows more convenient manipulation of the values of PL/pgSQL function variables. Pavel Stehule, re

pgsql: Keep plpgsql.h C++-clean.

2022-03-31 Thread Tom Lane
Keep plpgsql.h C++-clean. I forgot that "typeid" is a C++ keyword. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fb691bbb4c8d729e6701f708edbb003b73efb16b Modified Files -- src/pl/plpgsql/src/plpgsql.h | 2 +- 1 file changed, 1 insertion

pgsql: Switch the regression tests of pg_upgrade to use TAP tests

2022-03-31 Thread Michael Paquier
Switch the regression tests of pg_upgrade to use TAP tests This simplifies a lot of code in the tests of pg_upgrade without sacrificing its coverage: - Removal of test.sh used for builds with make, that has accumulated over the years tweaks for problems that are solved in a duplicated way by the c

pgsql: Improve handling and logging of TAP tests for pg_upgrade

2022-03-31 Thread Michael Paquier
Improve handling and logging of TAP tests for pg_upgrade This commit includes a set of improvements to help with the debugging of failures in these new TAP tests: - Instead of a plain diff command to compare the dumps generated, use File::Compare::compare for the same effect. diff is still used t

pgsql: Add macros in hash and btree AMs to get the special area of thei

2022-03-31 Thread Michael Paquier
Add macros in hash and btree AMs to get the special area of their pages This makes the code more consistent with SpGiST, GiST and GIN, that already use this style, and the idea is to make easier the introduction of more sanity checks for each of these AM-specific macros. BRIN uses a different set