Re: pgsql: psql: initialize comment-begin setting to a useful value by defa

2021-12-01 Thread Michael Paquier
Hi Tom, On Wed, Dec 01, 2021 at 05:24:58PM +, Tom Lane wrote: > psql: initialize comment-begin setting to a useful value by default. > > Readline's meta-# command is supposed to insert a comment marker > at the start of the current line. However, the default marker is > "#" which is entirely

pgsql: pg_waldump: Emit stats summary when interrupted by SIGINT

2021-12-01 Thread Michael Paquier
pg_waldump: Emit stats summary when interrupted by SIGINT Previously, pg_waldump would not display its statistics summary if it got interrupted by SIGINT (or say a simple Ctrl+C). It gains with this commit a signal handler for SIGINT, trapping the signal to exit at the earliest convenience to all

pgsql: Move into separate file all the SQL queries used in pg_upgrade t

2021-12-01 Thread Michael Paquier
Move into separate file all the SQL queries used in pg_upgrade tests The existing pg_upgrade/test.sh and the buildfarm code have been holding the same set of SQL queries when doing cross-version upgrade tests to adapt the objects created by the regression tests before the upgrade (mostly, incompat

pgsql: Move into separate file all the SQL queries used in pg_upgrade t

2021-12-01 Thread Michael Paquier
Move into separate file all the SQL queries used in pg_upgrade tests The existing pg_upgrade/test.sh and the buildfarm code have been holding the same set of SQL queries when doing cross-version upgrade tests to adapt the objects created by the regression tests before the upgrade (mostly, incompat

pgsql: Move into separate file all the SQL queries used in pg_upgrade t

2021-12-01 Thread Michael Paquier
Move into separate file all the SQL queries used in pg_upgrade tests The existing pg_upgrade/test.sh and the buildfarm code have been holding the same set of SQL queries when doing cross-version upgrade tests to adapt the objects created by the regression tests before the upgrade (mostly, incompat

pgsql: Move into separate file all the SQL queries used in pg_upgrade t

2021-12-01 Thread Michael Paquier
Move into separate file all the SQL queries used in pg_upgrade tests The existing pg_upgrade/test.sh and the buildfarm code have been holding the same set of SQL queries when doing cross-version upgrade tests to adapt the objects created by the regression tests before the upgrade (mostly, incompat

pgsql: Move into separate file all the SQL queries used in pg_upgrade t

2021-12-01 Thread Michael Paquier
Move into separate file all the SQL queries used in pg_upgrade tests The existing pg_upgrade/test.sh and the buildfarm code have been holding the same set of SQL queries when doing cross-version upgrade tests to adapt the objects created by the regression tests before the upgrade (mostly, incompat

pgsql: Move into separate file all the SQL queries used in pg_upgrade t

2021-12-01 Thread Michael Paquier
Move into separate file all the SQL queries used in pg_upgrade tests The existing pg_upgrade/test.sh and the buildfarm code have been holding the same set of SQL queries when doing cross-version upgrade tests to adapt the objects created by the regression tests before the upgrade (mostly, incompat

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Tom Lane
Michael Paquier writes: > On Wed, Dec 01, 2021 at 04:04:09PM -0500, Tom Lane wrote: >> I agree that some docs about this would be nice, but I think the rules >> for when to use perl2host are more complex than what you suggest here. >> Perhaps Andrew can clarify. > It seems to me that the rule app

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Michael Paquier
On Wed, Dec 01, 2021 at 04:04:09PM -0500, Tom Lane wrote: > I agree that some docs about this would be nice, but I think the rules > for when to use perl2host are more complex than what you suggest here. > Perhaps Andrew can clarify. +When passing a path from the Perl test code to PostgreSQL, like

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Tom Lane
Daniel Gustafsson writes: > Would it make sense to add something like the attached to the Portability > section in the src/test/perl/README? It definitely would've helped me with > this particular issue, but that's admittedly a pretty limited samplesize. I agree that some docs about this would b

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Daniel Gustafsson
> On 1 Dec 2021, at 20:49, Daniel Gustafsson wrote: > Looks like perl2host() was the missing piece, fairywren turned green with > commit c3b34a0ff4. Thanks for pointing me in the right direction, I will > draft > a small paragraph on this to the TAP test README for other to learn from. Would i

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Daniel Gustafsson
> On 1 Dec 2021, at 12:49, Daniel Gustafsson wrote: > >> On 1 Dec 2021, at 07:19, Michael Paquier wrote: >> >> On Tue, Nov 30, 2021 at 11:34:21PM -0500, Tom Lane wrote: >>> Daniel Gustafsson writes: Oh, interesting, I hadn't realized that. I'll go do that instead then. >>> >>> ... okay,

pgsql: Avoid leaking memory during large-scale REASSIGN OWNED BY operat

2021-12-01 Thread Tom Lane
Avoid leaking memory during large-scale REASSIGN OWNED BY operations. The various ALTER OWNER routines tend to leak memory in CurrentMemoryContext. That's not a problem when they're only called once per command; but in this usage where we might be touching many objects, it can amount to a serious

pgsql: Avoid leaking memory during large-scale REASSIGN OWNED BY operat

2021-12-01 Thread Tom Lane
Avoid leaking memory during large-scale REASSIGN OWNED BY operations. The various ALTER OWNER routines tend to leak memory in CurrentMemoryContext. That's not a problem when they're only called once per command; but in this usage where we might be touching many objects, it can amount to a serious

pgsql: Avoid leaking memory during large-scale REASSIGN OWNED BY operat

2021-12-01 Thread Tom Lane
Avoid leaking memory during large-scale REASSIGN OWNED BY operations. The various ALTER OWNER routines tend to leak memory in CurrentMemoryContext. That's not a problem when they're only called once per command; but in this usage where we might be touching many objects, it can amount to a serious

pgsql: Avoid leaking memory during large-scale REASSIGN OWNED BY operat

2021-12-01 Thread Tom Lane
Avoid leaking memory during large-scale REASSIGN OWNED BY operations. The various ALTER OWNER routines tend to leak memory in CurrentMemoryContext. That's not a problem when they're only called once per command; but in this usage where we might be touching many objects, it can amount to a serious

pgsql: Avoid leaking memory during large-scale REASSIGN OWNED BY operat

2021-12-01 Thread Tom Lane
Avoid leaking memory during large-scale REASSIGN OWNED BY operations. The various ALTER OWNER routines tend to leak memory in CurrentMemoryContext. That's not a problem when they're only called once per command; but in this usage where we might be touching many objects, it can amount to a serious

pgsql: Avoid leaking memory during large-scale REASSIGN OWNED BY operat

2021-12-01 Thread Tom Lane
Avoid leaking memory during large-scale REASSIGN OWNED BY operations. The various ALTER OWNER routines tend to leak memory in CurrentMemoryContext. That's not a problem when they're only called once per command; but in this usage where we might be touching many objects, it can amount to a serious

pgsql: psql: include intra-query "--" comments in what's sent to the se

2021-12-01 Thread Tom Lane
psql: include intra-query "--" comments in what's sent to the server. psql's lexer has historically deleted dash-dash (single-line) comments from what's collected and sent to the server. This is inconsistent with what it does for slash-star comments, and people have complained before that they wi

pgsql: psql: initialize comment-begin setting to a useful value by defa

2021-12-01 Thread Tom Lane
psql: initialize comment-begin setting to a useful value by default. Readline's meta-# command is supposed to insert a comment marker at the start of the current line. However, the default marker is "#" which is entirely unhelpful for SQL. Set it to "-- " instead. (This setting can still be over

pgsql: psql: treat "--" comments between queries as separate history en

2021-12-01 Thread Tom Lane
psql: treat "--" comments between queries as separate history entries. If we've not yet collected any non-whitespace, non-comment token for a new query, flush the current input line to history before reading another line. This aligns psql's history behavior with the observation that lines contain

pgsql: Remove unused includes

2021-12-01 Thread Peter Eisentraut
Remove unused includes These haven't been needed for a long time. Reviewed-by: John Naylor Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb...@enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/89d1c15d64602b0

pgsql: Improve some comments in scanner files

2021-12-01 Thread Peter Eisentraut
Improve some comments in scanner files Reviewed-by: John Naylor Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb...@enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fb7f70112fd80f13a8f124f51c4992fe290d3836 M

pgsql: Warning on SET of nonexisting setting with a prefix reserved by

2021-12-01 Thread Peter Eisentraut
Warning on SET of nonexisting setting with a prefix reserved by an extension An extension can already de facto reserve a GUC prefix using EmitWarningsOnPlaceholders(). But this was only checked against settings that exist at the time the extension is loaded (or the extension chooses to call this)

Re: pgsql: Update high level vacuumlazy.c comments.

2021-12-01 Thread Robert Haas
On Tue, Nov 30, 2021 at 3:45 PM Peter Geoghegan wrote: > On Tue, Nov 30, 2021 at 12:20 PM Robert Haas wrote: > > +1. And that shouldn't happen often. > > Why shouldn't it happen often? > > I accept that I ought to have included a discussion link in this > instance. But I don't see how that's rela

pgsql: Fix certificate paths to use perl2host

2021-12-01 Thread Daniel Gustafsson
Fix certificate paths to use perl2host Commit c113d8ad50 moved the copying of certificates into a temporary path for the duration of the tests, instead of using the source tree. This broke the tests on msys as the absolute path wasn't adapted for the msys platform. Ensure to convert the path with

pgsql: Document that tar archives are now properly terminated.

2021-12-01 Thread Robert Haas
Document that tar archives are now properly terminated. Commit 5a1007a5088cd6ddf892f7422ea8dbaef362372f changed the server behavior, but I didn't notice that the existing behavior was documented, and therefore did not update the documentation. This commit does that. I chose to mention that the be

pgsql: Remove mention of TimeLineID update from comments

2021-12-01 Thread Daniel Gustafsson
Remove mention of TimeLineID update from comments Commit 4a92a1c3d removed the TimeLineID update from RecoveryInProgress, update comments accordingly. Author: Amul Sul Discussion: https://postgr.es/m/caaj_b96wyzs8n45jc-kyd-bte02hrwqielzrpsutnbhap7_...@mail.gmail.com Branch -- master Detai

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Daniel Gustafsson
> On 1 Dec 2021, at 07:19, Michael Paquier wrote: > > On Tue, Nov 30, 2021 at 11:34:21PM -0500, Tom Lane wrote: >> Daniel Gustafsson writes: >>> Oh, interesting, I hadn't realized that. I'll go do that instead then. >> >> ... okay, so all we learned is that it really is an ENOENT failure. >> >

pgsql: Fix comment grammar in slotfuncs.c

2021-12-01 Thread Michael Paquier
Fix comment grammar in slotfuncs.c Author: Bharath Rupireddy Discussion: https://postgr.es/m/calj2acukrnr2xtak+qaqxotjpkgn8zxwripv7sr27t+q5qf...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7799d4e3bdd14c90989d829a9b24e73d4ff4d4ad Modified Files

pgsql: doc: Some additional information about when to use referential a

2021-12-01 Thread Peter Eisentraut
doc: Some additional information about when to use referential actions Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5786fe154b53caef8b226ed863312d3608b32a51 Modified Files -- doc/src/sgml/ddl.sgml | 21 + 1 file changed, 21 insertio