pgsql: Make GIN tests using injection points concurrent-safe

2024-04-09 Thread Michael Paquier
Make GIN tests using injection points concurrent-safe f587338dec87 has introduced in the test module injection_points a SQL function called injection_points_set_local(), that can be used to make all the injection points linked to the process where they are attached, discarded automatically if any

pgsql: Fix a test in failover slots regression test.

2024-04-09 Thread Amit Kapila
Fix a test in failover slots regression test. Wait for the standby to catch up before syncing the slots with pg_sync_replication_slots(), otherwise, the logical slot could be ahead and the sync would fail. The other way to fix the test is to change it to use slotsync worker and poll for the sync

pgsql: Fix illegal attribute propagation in LLVM JIT.

2024-04-09 Thread Thomas Munro
Fix illegal attribute propagation in LLVM JIT. Commit 72559438 started copying more attributes from AttributeTemplate to the functions we generate on the fly. In the case of deform functions, which return void, this meant that "noundef", from AttributeTemplate's return value (a Datum) was copied

pgsql: Fix illegal attribute propagation in LLVM JIT.

2024-04-09 Thread Thomas Munro
Fix illegal attribute propagation in LLVM JIT. Commit 72559438 started copying more attributes from AttributeTemplate to the functions we generate on the fly. In the case of deform functions, which return void, this meant that "noundef", from AttributeTemplate's return value (a Datum) was copied

pgsql: Fix illegal attribute propagation in LLVM JIT.

2024-04-09 Thread Thomas Munro
Fix illegal attribute propagation in LLVM JIT. Commit 72559438 started copying more attributes from AttributeTemplate to the functions we generate on the fly. In the case of deform functions, which return void, this meant that "noundef", from AttributeTemplate's return value (a Datum) was copied

pgsql: Fix illegal attribute propagation in LLVM JIT.

2024-04-09 Thread Thomas Munro
Fix illegal attribute propagation in LLVM JIT. Commit 72559438 started copying more attributes from AttributeTemplate to the functions we generate on the fly. In the case of deform functions, which return void, this meant that "noundef", from AttributeTemplate's return value (a Datum) was copied

pgsql: Fix illegal attribute propagation in LLVM JIT.

2024-04-09 Thread Thomas Munro
Fix illegal attribute propagation in LLVM JIT. Commit 72559438 started copying more attributes from AttributeTemplate to the functions we generate on the fly. In the case of deform functions, which return void, this meant that "noundef", from AttributeTemplate's return value (a Datum) was copied

pgsql: Fix illegal attribute propagation in LLVM JIT.

2024-04-09 Thread Thomas Munro
Fix illegal attribute propagation in LLVM JIT. Commit 72559438 started copying more attributes from AttributeTemplate to the functions we generate on the fly. In the case of deform functions, which return void, this meant that "noundef", from AttributeTemplate's return value (a Datum) was copied

pgsql: Fixup various StringInfo function usages

2024-04-09 Thread David Rowley
Fixup various StringInfo function usages This adjusts various appendStringInfo* function calls to use a more appropriate and efficient function with the same behavior. For example, use appendStringInfoChar() when appending a single character rather than appendStringInfo() and

pgsql: revert: Transform OR clauses to ANY expression

2024-04-09 Thread Alexander Korotkov
revert: Transform OR clauses to ANY expression This commit reverts 72bd38cc99 due to implementation and design issues. Reported-by: Tom Lane Discussion: https://postgr.es/m/3604469.1712628736%40sss.pgh.pa.us Branch -- master Details ---

Re: pgsql: Introduce a bump memory allocator

2024-04-09 Thread David Rowley
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? David

pgsql: Remove unused BumpBlockIsValid macro

2024-04-09 Thread David Rowley
Remove unused BumpBlockIsValid macro The bump allocator was recently added in 29f6a959c. Our other allocators have a similar macro to this, but seemingly the version of the macro for those allocators is only used in places where the chunk header is decoded. Since the bump allocator has no chunk

pgsql: Checks for ALTER TABLE ... SPLIT/MERGE PARTITIONS ... commands

2024-04-09 Thread Alexander Korotkov
Checks for ALTER TABLE ... SPLIT/MERGE PARTITIONS ... commands Check that the target partition actually belongs to the parent table. Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/cd842601-cf1a-9806-f7b7-d2509b93ba61%40gmail.com Author: Dmitry Koval Branch -- master Details

pgsql: Doc: use "an SQL" instead of "a SQL"

2024-04-09 Thread David Rowley
Doc: use "an SQL" instead of "a SQL" Although which is correct depends entirely on whether you pronounce SQL as "ess-que-ell" or "sequel", we have standardized on the former in our user-facing documentation, so use the correct article according to that pronunciation. Discussion:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: Fix incorrect format placeholders

2024-04-09 Thread Peter Eisentraut
Fix incorrect format placeholders Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/27074bce08e994daf6b8fe9a84877ac257210fdd Modified Files -- src/backend/commands/explain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: Update config.guess and config.sub

2024-04-09 Thread Peter Eisentraut
Update config.guess and config.sub Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cfd6ea3ac04113b756e3e722af5d9247ff2da35f Modified Files -- config/config.guess | 62 +++--- config/config.sub | 232

Re: pgsql: Introduce a bump memory allocator

2024-04-09 Thread Peter Eisentraut
On 07.04.24 14:03, David Rowley wrote: Introduce a bump memory allocator This patch introduces in bump.c the macro BumpBlockIsValid(), but it's not used anywhere. Can we remove it? (If we don't remove it, I suggest to make it an inline function, so it's easier to tell what it's supposed

pgsql: Fix whitespace

2024-04-09 Thread Peter Eisentraut
Fix whitespace Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/43a9cab4844b9c933f1a24e24a38311ee24deefd Modified Files -- doc/src/sgml/ddl.sgml| 2 +- src/test/modules/test_json_parser/t/003_test_semantic.pl | 6 --

pgsql: Get rid of anonymous struct

2024-04-09 Thread John Naylor
Get rid of anonymous struct This is a C11 feature, and we require C99. While at it, go the further step and get rid of the surrounding union (with uintptr_t) entirely, as there is currently no use case for this file to access the header of BlocktableEntry as a uintptr_t, and there are no

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

2024-04-09 Thread Kyotaro Horiguchi
At Tue, 9 Apr 2024 08:14:53 +0300, Heikki Linnakangas wrote in > 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