Re: pgsql: Fix potential stack overflow in incremental backup.

2024-04-10 Thread Thomas Munro
On Thu, Apr 11, 2024 at 2:28 PM Michael Paquier wrote: > + * file just as if this were not an incremental backup. The contents of the > + * relative_block_numbers array is unspecified in this case. > > Perhaps you mean s/is/are/ here? The contents are what's not > specified. Thanks, fixed. Duh

pgsql: Fix grammar.

2024-04-10 Thread Thomas Munro
Fix grammar. Reported-by: Michael Paquier Discussion: https://postgr.es/m/ZhdKqj5DwoOzirFv%40paquier.xyz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/942219996c632ae9e66c2c4a759e93abc92014ff Modified Files -- src/backend/backup/basebackup_incrementa

Re: pgsql: Fix potential stack overflow in incremental backup.

2024-04-10 Thread Michael Paquier
Hi Thomas, On Thu, Apr 11, 2024 at 01:53:24AM +, Thomas Munro wrote: > Fix potential stack overflow in incremental backup. > > The user can set RELSEG_SIZE to a high number at compile time, so we > can't use it to control the size of an array on the stack: it could be > many gigabytes in size

pgsql: Fix potential stack overflow in incremental backup.

2024-04-10 Thread Thomas Munro
Fix potential stack overflow in incremental backup. The user can set RELSEG_SIZE to a high number at compile time, so we can't use it to control the size of an array on the stack: it could be many gigabytes in size. On closer inspection, we don't really need that intermediate array anyway. Let's

pgsql: Fix inconsistency with replay of hash squeeze record for clean b

2024-04-10 Thread Michael Paquier
Fix inconsistency with replay of hash squeeze record for clean buffers aa5edbe379d6 has tweaked _hash_freeovflpage() so as the write buffer's LSN is updated only when necessary, when REGBUF_NO_CHANGE is not used. The replay code was not consistent with that, causing the write buffer's LSN to be u

Re: pgsql: Refactor libpq state machine for negotiating encryption

2024-04-10 Thread Thomas Munro
On Thu, Apr 11, 2024 at 11:25 AM Tom Lane wrote: > Thomas Munro writes: > > If -Dssl=none and -Dgssapi=disabled, compilation of fe-connect.c > > fails: call to undeclared function 'encryption_negotiation_failed'. I > > didn't look too hard, but maybe ENABLE_GSS and USE_GSS are confused? > > For

Re: pgsql: Refactor libpq state machine for negotiating encryption

2024-04-10 Thread Tom Lane
Thomas Munro writes: > If -Dssl=none and -Dgssapi=disabled, compilation of fe-connect.c > fails: call to undeclared function 'encryption_negotiation_failed'. I > didn't look too hard, but maybe ENABLE_GSS and USE_GSS are confused? For me, configure --with-gssapi fails like that, but the other th

Re: pgsql: Refactor libpq state machine for negotiating encryption

2024-04-10 Thread Thomas Munro
On Mon, Apr 8, 2024 at 1:25 PM Heikki Linnakangas wrote: > Refactor libpq state machine for negotiating encryption > > This fixes the few corner cases noted in commit 705843d294, as shown > by the changes in the test. > > Author: Heikki Linnakangas, Matthias van de Meent > Reviewed-by: Jacob Champ

pgsql: Fix plpgsql's handling of -- comments following expressions.

2024-04-10 Thread Tom Lane
Fix plpgsql's handling of -- comments following expressions. Up to now, read_sql_construct() has collected all the source text from the statement or expression's initial token up to the character just before the "until" token. It normally tries to strip trailing whitespace from that, largely for

pgsql: Fix plpgsql's handling of -- comments following expressions.

2024-04-10 Thread Tom Lane
Fix plpgsql's handling of -- comments following expressions. Up to now, read_sql_construct() has collected all the source text from the statement or expression's initial token up to the character just before the "until" token. It normally tries to strip trailing whitespace from that, largely for

pgsql: Fix plpgsql's handling of -- comments following expressions.

2024-04-10 Thread Tom Lane
Fix plpgsql's handling of -- comments following expressions. Up to now, read_sql_construct() has collected all the source text from the statement or expression's initial token up to the character just before the "until" token. It normally tries to strip trailing whitespace from that, largely for

pgsql: Fix plpgsql's handling of -- comments following expressions.

2024-04-10 Thread Tom Lane
Fix plpgsql's handling of -- comments following expressions. Up to now, read_sql_construct() has collected all the source text from the statement or expression's initial token up to the character just before the "until" token. It normally tries to strip trailing whitespace from that, largely for

pgsql: Fix plpgsql's handling of -- comments following expressions.

2024-04-10 Thread Tom Lane
Fix plpgsql's handling of -- comments following expressions. Up to now, read_sql_construct() has collected all the source text from the statement or expression's initial token up to the character just before the "until" token. It normally tries to strip trailing whitespace from that, largely for

pgsql: Fix plpgsql's handling of -- comments following expressions.

2024-04-10 Thread Tom Lane
Fix plpgsql's handling of -- comments following expressions. Up to now, read_sql_construct() has collected all the source text from the statement or expression's initial token up to the character just before the "until" token. It normally tries to strip trailing whitespace from that, largely for

Re: pgsql: Add tests for libpq gssencmode and sslmode options

2024-04-10 Thread Heikki Linnakangas
On 10/04/2024 17:48, Peter Eisentraut wrote: On 08.04.24 01:50, Heikki Linnakangas wrote: Add tests for libpq gssencmode and sslmode options Why aren't these tests at src/interfaces/libpq/t/nnn_negotiate_encryption.pl ? To be honest, it never occurred to me. It started out as extra tests un

Re: pgsql: Add tests for libpq gssencmode and sslmode options

2024-04-10 Thread Peter Eisentraut
On 08.04.24 01:50, Heikki Linnakangas wrote: Add tests for libpq gssencmode and sslmode options Why aren't these tests at src/interfaces/libpq/t/nnn_negotiate_encryption.pl ? Test all combinations of gssencmode, sslmode, whether the server supports SSL and/or GSSAPI encryption, and whether

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network o

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network o

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network o

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network o

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network o

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network o

Re: pgsql: Introduce a bump memory allocator

2024-04-10 Thread Peter Eisentraut
On 10.04.24 01:11, David Rowley wrote: On Wed, 10 Apr 2024 at 00:05, Peter Eisentraut wrote: This patch introduces in bump.c the macro BumpBlockIsValid(), but it's not used anywhere. Can we remove it? I've just pushed a patch to remove it. Was that spotted by eagle eyes or tooling? I used