Re: pgsql: Add TAP tests for timeouts

2024-03-14 Thread Michael Paquier
On Fri, Mar 15, 2024 at 10:42:35AM +0900, Kyotaro Horiguchi wrote: > In 005_timeouts.pl, I found the following comment. Note also that the test is not stable, one of my machines with injection points enabled has complained twice in its last three runs:

Re: pgsql: Add TAP tests for timeouts

2024-03-14 Thread Kyotaro Horiguchi
Hello. At Thu, 14 Mar 2024 11:25:42 +, Alexander Korotkov wrote in > Add TAP tests for timeouts > > This commit adds new tests to verify that transaction_timeout, > idle_session_timeout, and idle_in_transaction_session_timeout work as > expected. > We introduce new injection points in

pgsql: Add basic TAP tests for the low-level backup method, take two

2024-03-14 Thread Michael Paquier
Add basic TAP tests for the low-level backup method, take two There are currently no tests for the low-level backup method where pg_backup_start() and pg_backup_stop() are involved while taking a file-system backup. The tests introduced in this commit rely on a background psql process to make

pgsql: Refactor initial hash lookup in dynahash.c

2024-03-14 Thread Michael Paquier
Refactor initial hash lookup in dynahash.c The same pattern is used three times in dynahash.c to retrieve a bucket number and a hash bucket from a hash value. This has popped up while discussing improvements for the type cache, where this piece of refactoring would become useful. Note that

pgsql: Trim ORDER BY/DISTINCT aggregate pathkeys in gather_grouping_pat

2024-03-14 Thread David Rowley
Trim ORDER BY/DISTINCT aggregate pathkeys in gather_grouping_paths Similar to d8a295389, trim off any PathKeys which are for ORDER BY / DISTINCT aggregate functions from the PathKey List for the Gather Merge paths created by gather_grouping_paths(). These additional PathKeys are not valid to use

pgsql: Trim ORDER BY/DISTINCT aggregate pathkeys in gather_grouping_pat

2024-03-14 Thread David Rowley
Trim ORDER BY/DISTINCT aggregate pathkeys in gather_grouping_paths Similar to d8a295389, trim off any PathKeys which are for ORDER BY / DISTINCT aggregate functions from the PathKey List for the Gather Merge paths created by gather_grouping_paths(). These additional PathKeys are not valid to use

pgsql: Login event trigger documentation wordsmithing

2024-03-14 Thread Daniel Gustafsson
Login event trigger documentation wordsmithing Minor wordsmithing on the login trigger documentation and code comments to improve readability, as well as fixing a few small incorrect statements in the comments. Author: Robert Treat Discussion:

pgsql: Make INSERT-from-multiple-VALUES-rows handle domain target colum

2024-03-14 Thread Tom Lane
Make INSERT-from-multiple-VALUES-rows handle domain target columns. Commit a3c7a993d fixed some cases involving target columns that are arrays or composites by applying transformAssignedExpr to the VALUES entries, and then stripping off any assignment ArrayRefs or FieldStores that the

pgsql: Make INSERT-from-multiple-VALUES-rows handle domain target colum

2024-03-14 Thread Tom Lane
Make INSERT-from-multiple-VALUES-rows handle domain target columns. Commit a3c7a993d fixed some cases involving target columns that are arrays or composites by applying transformAssignedExpr to the VALUES entries, and then stripping off any assignment ArrayRefs or FieldStores that the

pgsql: Make INSERT-from-multiple-VALUES-rows handle domain target colum

2024-03-14 Thread Tom Lane
Make INSERT-from-multiple-VALUES-rows handle domain target columns. Commit a3c7a993d fixed some cases involving target columns that are arrays or composites by applying transformAssignedExpr to the VALUES entries, and then stripping off any assignment ArrayRefs or FieldStores that the

pgsql: Make INSERT-from-multiple-VALUES-rows handle domain target colum

2024-03-14 Thread Tom Lane
Make INSERT-from-multiple-VALUES-rows handle domain target columns. Commit a3c7a993d fixed some cases involving target columns that are arrays or composites by applying transformAssignedExpr to the VALUES entries, and then stripping off any assignment ArrayRefs or FieldStores that the

pgsql: Make INSERT-from-multiple-VALUES-rows handle domain target colum

2024-03-14 Thread Tom Lane
Make INSERT-from-multiple-VALUES-rows handle domain target columns. Commit a3c7a993d fixed some cases involving target columns that are arrays or composites by applying transformAssignedExpr to the VALUES entries, and then stripping off any assignment ArrayRefs or FieldStores that the

pgsql: Make INSERT-from-multiple-VALUES-rows handle domain target colum

2024-03-14 Thread Tom Lane
Make INSERT-from-multiple-VALUES-rows handle domain target columns. Commit a3c7a993d fixed some cases involving target columns that are arrays or composites by applying transformAssignedExpr to the VALUES entries, and then stripping off any assignment ArrayRefs or FieldStores that the

pgsql: Add pg_column_toast_chunk_id().

2024-03-14 Thread Nathan Bossart
Add pg_column_toast_chunk_id(). This function returns the chunk_id of an on-disk TOASTed value. If the value is un-TOASTed or not on-disk, it returns NULL. This is useful for identifying which values are actually TOASTed and for investigating "unexpected chunk number" errors. Bumps catversion.

pgsql: Remove redundant snapshot copying from parallel leader to worker

2024-03-14 Thread Heikki Linnakangas
Remove redundant snapshot copying from parallel leader to workers The parallel query infrastructure copies the leader backend's active snapshot to the worker processes. But BitmapHeapScan node also had bespoken code to pass the snapshot from leader to the worker. That was redundant, so remove it.

pgsql: Allow a no-wait lock acquisition to succeed in more cases.

2024-03-14 Thread Robert Haas
Allow a no-wait lock acquisition to succeed in more cases. We don't determine the position at which a process waiting for a lock should insert itself into the wait queue until we reach ProcSleep(), and we may at that point discover that we must insert ourselves ahead of everyone who wants a

pgsql: Fix contrib/pg_visibility/meson.build

2024-03-14 Thread Alexander Korotkov
Fix contrib/pg_visibility/meson.build I broke that in e85662df44ff by oversight. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c20d90a41ca869f9c6dd4058ad1c7f5c9ee9d912 Modified Files -- contrib/pg_visibility/meson.build | 1 + 1 file changed, 1

pgsql: Add TAP tests for timeouts

2024-03-14 Thread Alexander Korotkov
Add TAP tests for timeouts This commit adds new tests to verify that transaction_timeout, idle_session_timeout, and idle_in_transaction_session_timeout work as expected. We introduce new injection points in before throwing a timeout FATAL error and check these injection points are reached.

pgsql: Fix false reports in pg_visibility

2024-03-14 Thread Alexander Korotkov
Fix false reports in pg_visibility Currently, pg_visibility computes its xid horizon using the GetOldestNonRemovableTransactionId(). The problem is that this horizon can sometimes go backward. That can lead to reporting false errors. In order to fix that, this commit implements a new function

pgsql: Comment out noisy libpq_pipeline test

2024-03-14 Thread Alvaro Herrera
Comment out noisy libpq_pipeline test libpq_pipeline's new 'cancel' test needs more research; disable it temporarily to prevent measles in the buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cc6e64afda530576d83e331365d36c758495a7cd Modified Files

pgsql: Fix documentation comment for pg_md5_hash

2024-03-14 Thread Daniel Gustafsson
Fix documentation comment for pg_md5_hash Commit b69aba74578 added the errstr parameter to pg_md5_hash but missed updating the synopsis in the documentation comment. The follow-up commit 587de223f03 added the parameter to the list of outputs. The returnvalue had been changed from integer to

pgsql: Fix typos in reorderbuffer.c.

2024-03-14 Thread Amit Kapila
Fix typos in reorderbuffer.c. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20240314.132817.1496502692848380820.horikyota@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9c40db3b02a41e978ebeb2c61930498a36812bbf Modified Files

pgsql: Introduce "builtin" collation provider.

2024-03-14 Thread Jeff Davis
Introduce "builtin" collation provider. New provider for collations, like "libc" or "icu", but without any external dependency. Initially, the only locale supported by the builtin provider is "C", which is identical to the libc provider's "C" locale. The libc provider's "C" locale has always

pgsql: Put genbki.pl output into src/include/catalog/ directly

2024-03-14 Thread Peter Eisentraut
Put genbki.pl output into src/include/catalog/ directly With the makefile rules, the output of genbki.pl was written to src/backend/catalog/, and then the header files were linked to src/include/catalog/. This changes it so that the output files are written directly to src/include/catalog/.