Re: pgsql: With gssencmode='require', check credential cache before connect

2024-04-08 Thread Heikki Linnakangas
On 09/04/2024 04:46, Kyotaro Horiguchi wrote: Hello. At Sun, 07 Apr 2024 23:50:08 +, Heikki Linnakangas wrote in With gssencmode='require', check credential cache before connecting This commit adds the following error message (indentations are adjusted): +

pgsql: libpq error message fixes

2024-04-08 Thread Heikki Linnakangas
libpq error message fixes Remove stray paren, capitalize SSL and ALPN. Author: Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20240409.104613.1653854506705708036.horikyota@gmail.com Branch -- master Details ---

pgsql: Fix typo in docs

2024-04-08 Thread Heikki Linnakangas
Fix typo in docs Author: Erik Rijkers Discussion: https://www.postgresql.org/message-id/0167b1e1-676c-66ba-e857-3ad7cd844...@xs4all.nl Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e9f29233fd67bd6b6667b61c88aa1f37f61f353a Modified Files --

pgsql: Add missing set_pglocale_pgservice() for pg_walsummary and pg_co

2024-04-08 Thread Michael Paquier
Add missing set_pglocale_pgservice() for pg_walsummary and pg_combinebackup These calls are required to make both tools work with NLS. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20240408.162702.183779935636035593.horikyota@gmail.com Branch -- master Details ---

Re: pgsql: Teach radix tree to embed values at runtime

2024-04-08 Thread John Naylor
On Tue, Apr 9, 2024 at 12:27 AM Andres Freund wrote: > > This isn't quite C99 conformant, and thus breaks on the buildfarm animal > set up to test that: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mylodon=2024-04-08%2012%3A07%3A01 I haven't forgotten about this and will fix within

Re: pgsql: With gssencmode='require', check credential cache before connect

2024-04-08 Thread Kyotaro Horiguchi
Hello. At Sun, 07 Apr 2024 23:50:08 +, Heikki Linnakangas wrote in > With gssencmode='require', check credential cache before connecting This commit adds the following error message (indentations are adjusted): + libpq_append_conn_error(conn, + "GSSAPI encryption

pgsql: injection_points: Fix race condition with local injection point

2024-04-08 Thread Michael Paquier
injection_points: Fix race condition with local injection point tests The module relies on a shmem exit callback to clean up any injection points linked to a specific process. One of the tests checks for the case of an injection point name reused in a second connection where the first connection

pgsql: In psql, avoid leaking a PGresult after a query is cancelled.

2024-04-08 Thread Tom Lane
In psql, avoid leaking a PGresult after a query is cancelled. After a query cancel, the tail end of ExecQueryAndProcessResults took care to clear any not-yet-read PGresults; but it forgot about the one it has already read. There would only be such a result when handling a multi-command string

pgsql: In psql, avoid leaking a PGresult after a query is cancelled.

2024-04-08 Thread Tom Lane
In psql, avoid leaking a PGresult after a query is cancelled. After a query cancel, the tail end of ExecQueryAndProcessResults took care to clear any not-yet-read PGresults; but it forgot about the one it has already read. There would only be such a result when handling a multi-command string

pgsql: In psql, avoid leaking a PGresult after a query is cancelled.

2024-04-08 Thread Tom Lane
In psql, avoid leaking a PGresult after a query is cancelled. After a query cancel, the tail end of ExecQueryAndProcessResults took care to clear any not-yet-read PGresults; but it forgot about the one it has already read. There would only be such a result when handling a multi-command string

pgsql: Further review for re-implementation of psql's FETCH_COUNT featu

2024-04-08 Thread Tom Lane
Further review for re-implementation of psql's FETCH_COUNT feature. Alexander Lakhin noted an obsolete comment, which led me to revisit some other important comments in the patch, and that study turned up a couple of unintended ways in which the chunked-fetch code path didn't match the normal

Re: pgsql: Teach radix tree to embed values at runtime

2024-04-08 Thread Andres Freund
Hi, On 2024-04-08 11:57:01 +, John Naylor wrote: > Teach radix tree to embed values at runtime > > Previously, the decision to store values in leaves or within the child > pointer was made at compile time, with variable length values using > leaves by necessity. This commit allows

Re: pgsql: Transform OR clauses to ANY expression

2024-04-08 Thread Jelte Fennema-Nio
On Mon, 8 Apr 2024 at 17:10, Alexander Korotkov wrote: > > On Mon, Apr 8, 2024 at 1:35 AM Melanie Plageman > wrote: > > /src/backend/optimizer/prep/prepqual.c:582:33: warning: declaration of > > ‘lc__state’ shadows a previous local [-Wshadow=compatible-local] > > 582 |

pgsql: Teach radix tree to embed values at runtime

2024-04-08 Thread John Naylor
Teach radix tree to embed values at runtime Previously, the decision to store values in leaves or within the child pointer was made at compile time, with variable length values using leaves by necessity. This commit allows introspecting the length of variable length values at runtime for that

pgsql: Teach TID store to skip bitmap for small numbers of offsets

2024-04-08 Thread John Naylor
Teach TID store to skip bitmap for small numbers of offsets The header portion of BlocktableEntry has enough padding space for an array of 3 offsets (1 on 32-bit platforms). Use this space instead of having a sparse bitmap array. This will take up a constant amount of space no matter what the

pgsql: Provide a way block-level table AMs could re-use acquire_sample_

2024-04-08 Thread Alexander Korotkov
Provide a way block-level table AMs could re-use acquire_sample_rows() While keeping API the same, this commit provides a way for block-level table AMs to re-use existing acquire_sample_rows() by providing custom callbacks for getting the next block and the next tuple. Reported-by: Andres Freund

pgsql: Fix some grammer errors from error messages and codes comments

2024-04-08 Thread Alexander Korotkov
Fix some grammer errors from error messages and codes comments Discussion: https://postgr.es/m/CAHewXNkGMPU50QG7V6Q60JGFORfo8LfYO1_GCkCa0VWbmB-fEw%40mail.gmail.com Author: Tender Wang Branch -- master Details ---

pgsql: Fill CommonRdOptions with default values in extract_autovac_opts

2024-04-08 Thread Alexander Korotkov
Fill CommonRdOptions with default values in extract_autovac_opts() Reported-by: Thomas Munro Reported-by: Pavel Borisov Discussion: https://postgr.es/m/CA%2BhUKGLZzLR50RBvuqOO3MZ%3DF54ETz-rTp1PDX9uDGP_GqyYqA%40mail.gmail.com Branch -- master Details ---

Re: pgsql: Enhance libpq encryption negotiation tests with new GUC

2024-04-08 Thread Heikki Linnakangas
On 08/04/2024 09:40, Kyotaro Horiguchi wrote: At Sun, 07 Apr 2024 23:50:08 +, Heikki Linnakangas wrote in Enhance libpq encryption negotiation tests with new GUC This commit adds the following messages: gettext_noop("Log details of pre-authentication connection handshake."), Similar

pgsql: Adjust wording of trace_connection_negotiation GUC's description

2024-04-08 Thread Heikki Linnakangas
Adjust wording of trace_connection_negotiation GUC's description We're not very consistent about this across all the GUCs, but the "Logs ..." phrasing is more common than "Log ...", and is used by the neighboring "log_connections" and "log_disconnections" GUCs, so switch to that. Author: Kyotaro

Re: pgsql: Custom reloptions for table AM

2024-04-08 Thread Alexander Korotkov
Hi, Thomas! On Mon, Apr 8, 2024 at 12:03 PM Thomas Munro wrote: > I think this is uninitialised memory: I'm already working on this. Will be fixed in 10-15 minutes. -- Regards, Alexander Korotkov

Re: pgsql: Custom reloptions for table AM

2024-04-08 Thread Thomas Munro
Hi Alexander, I think this is uninitialised memory: ../pgsql/src/backend/postmaster/autovacuum.c:2988:33: runtime error: load of value 80, which is not a valid value for type '_Bool' #0 0x56010b3b6e47 in relation_needs_vacanalyze ../pgsql/src/backend/postmaster/autovacuum.c:2988 #1

pgsql: Custom reloptions for table AM

2024-04-08 Thread Alexander Korotkov
Custom reloptions for table AM Let table AM define custom reloptions for its tables. This allows specifying AM-specific parameters by the WITH clause when creating a table. The reloptions, which could be used outside of table AM, are now extracted into the CommonRdOptions data structure. These

pgsql: Fix the intermittent buildfarm failures in 040_standby_failover_

2024-04-08 Thread Amit Kapila
Fix the intermittent buildfarm failures in 040_standby_failover_slots_sync. It is possible that even if the primary waits for the subscriber to catch up and then disables the subscription, the XLOG_RUNNING_XACTS record gets inserted between the two steps by bgwriter and walsender processes it.

pgsql: Use bump context for TID bitmaps stored by vacuum

2024-04-08 Thread John Naylor
Use bump context for TID bitmaps stored by vacuum Vacuum does not pfree individual entries, and only frees the entire storage space when finished with it. This allows using a bump context, eliminating the chunk header in each leaf allocation. Most leaf allocations will be 16 to 32 bytes, so

Re: pgsql: Transform OR clauses to ANY expression

2024-04-08 Thread Alexander Korotkov
On Mon, Apr 8, 2024 at 9:24 AM Kyotaro Horiguchi wrote: > At Mon, 08 Apr 2024 14:46:57 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Sun, 07 Apr 2024 22:28:06 +, Alexander Korotkov > > wrote in > > > Transform OR clauses to ANY expression > > > > This commit introduces a message like

pgsql: Fix JsonExpr deparsing to emit QUOTES and WRAPPER correctly

2024-04-08 Thread Amit Langote
Fix JsonExpr deparsing to emit QUOTES and WRAPPER correctly Currently, get_json_expr_options() does not emit the default values for QUOTES (KEEP QUOTES) and WRAPPER (WITHOUT WRAPPER). That causes the deparsed JSON_TABLE() columns, such as those contained in a a view's query, to behave

pgsql: Fix restriction on specifying KEEP QUOTES in JSON_QUERY()

2024-04-08 Thread Amit Langote
Fix restriction on specifying KEEP QUOTES in JSON_QUERY() Currently, transformJsonFuncExpr() enforces some restrictions on the combinations of QUOTES and WRAPPER clauses that can be specified in JSON_QUERY(). The intent was to only prevent the useless combination WITH WRAPPER OMIT QUOTES, but

pgsql: JSON_TABLE: Add support for NESTED paths and columns

2024-04-08 Thread Amit Langote
JSON_TABLE: Add support for NESTED paths and columns A NESTED path allows to extract data from nested levels of JSON objects given by the parent path expression, which are projected as columns specified using a nested COLUMNS clause, just like the parent COLUMNS clause. Rows comprised from a

Re: pgsql: Enhance libpq encryption negotiation tests with new GUC

2024-04-08 Thread Kyotaro Horiguchi
At Sun, 07 Apr 2024 23:50:08 +, Heikki Linnakangas wrote in > Enhance libpq encryption negotiation tests with new GUC This commit adds the following messages: > gettext_noop("Log details of pre-authentication connection handshake."), Similar to a nearby commit, other messages with a

Re: pgsql: Transform OR clauses to ANY expression

2024-04-08 Thread Kyotaro Horiguchi
At Mon, 08 Apr 2024 14:46:57 +0900 (JST), Kyotaro Horiguchi wrote in > At Sun, 07 Apr 2024 22:28:06 +, Alexander Korotkov > wrote in > > Transform OR clauses to ANY expression > > This commit introduces a message like this: > > > gettext_noop("Set the minimum length of the list of OR

pgsql: Fix the wording of or_to_any_transform_limit description

2024-04-08 Thread Alexander Korotkov
Fix the wording of or_to_any_transform_limit description Reported-by: Kyotaro Horiguchi Discussion: https://postgr.es/m/20240408.144657.1746688590065601661.horikyota.ntt%40gmail.com Branch -- master Details ---

pgsql: Fix the value of or_to_any_transform_limit in postgresql.conf.sa

2024-04-08 Thread Alexander Korotkov
Fix the value of or_to_any_transform_limit in postgresql.conf.sample Reported-by: Justin Pryzby Discussion: https://postgr.es/m/ZhM8jH8gsKm5Q-9p%40pryzbyj2023 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2af75e1174786a02fc35755c0cb98c522d72a065 Modified Files