pgsql: pg_walsummary: Improve stability of test checking statistics

2025-07-07 Thread Michael Paquier
pg_walsummary: Improve stability of test checking statistics Per buildfarm member culicidae, the query checking for stats reported by the WAL summarizer related to WAL reads is proving to be unstable. Instead of a one-time query, this commit replaces the logic with a polling query checking for th

pgsql: pg_walsummary: Improve stability of test checking statistics

2025-07-07 Thread Michael Paquier
pg_walsummary: Improve stability of test checking statistics Per buildfarm member culicidae, the query checking for stats reported by the WAL summarizer related to WAL reads is proving to be unstable. Instead of a one-time query, this commit replaces the logic with a polling query checking for th

pgsql: aio: Combine io_uring memory mappings, if supported

2025-07-07 Thread Andres Freund
aio: Combine io_uring memory mappings, if supported By default io_uring creates a shared memory mapping for each io_uring instance, leading to a large number of memory mappings. Unfortunately a large number of memory mappings slows things down, backend exit is particularly affected. To address th

pgsql: aio: Combine io_uring memory mappings, if supported

2025-07-07 Thread Andres Freund
aio: Combine io_uring memory mappings, if supported By default io_uring creates a shared memory mapping for each io_uring instance, leading to a large number of memory mappings. Unfortunately a large number of memory mappings slows things down, backend exit is particularly affected. To address th

pgsql: Consider explicit incremental sort for Append and MergeAppend

2025-07-07 Thread Richard Guo
Consider explicit incremental sort for Append and MergeAppend For an ordered Append or MergeAppend, we need to inject an explicit sort into any subpath that is not already well enough ordered. Currently, only explicit full sorts are considered; incremental sorts are not yet taken into account. In

pgsql: oauth: Fix kqueue detection on OpenBSD

2025-07-07 Thread Jacob Champion
oauth: Fix kqueue detection on OpenBSD In b0635bfda, I added an early header check to the Meson OAuth support, which was intended to duplicate the later checks for HAVE_SYS_[EVENT|EPOLL]_H. However, I implemented the new test via check_header() -- which tries to compile -- rather than has_header()

pgsql: oauth: Fix kqueue detection on OpenBSD

2025-07-07 Thread Jacob Champion
oauth: Fix kqueue detection on OpenBSD In b0635bfda, I added an early header check to the Meson OAuth support, which was intended to duplicate the later checks for HAVE_SYS_[EVENT|EPOLL]_H. However, I implemented the new test via check_header() -- which tries to compile -- rather than has_header()

pgsql: Adapt pg_upgrade test to pg_lsn output format difference

2025-07-07 Thread Álvaro Herrera
Adapt pg_upgrade test to pg_lsn output format difference Commit 2633dae2e487 added some zero padding to various LSNs output routines so that the low word is always 8 hex digits long, for easy human consumption. This included the pg_lsn datatype, which breaks the pg_upgrade test when it compares t

pgsql: Restore the ability to run pl/pgsql expression queries in parall

2025-07-07 Thread Tom Lane
Restore the ability to run pl/pgsql expression queries in parallel. pl/pgsql's notion of an "expression" is very broad, encompassing any SQL SELECT query that returns a single column and no more than one row. So there are cases, for example evaluation of an aggregate function, where the query inv

pgsql: Restore the ability to run pl/pgsql expression queries in parall

2025-07-07 Thread Tom Lane
Restore the ability to run pl/pgsql expression queries in parallel. pl/pgsql's notion of an "expression" is very broad, encompassing any SQL SELECT query that returns a single column and no more than one row. So there are cases, for example evaluation of an aggregate function, where the query inv

pgsql: Restore the ability to run pl/pgsql expression queries in parall

2025-07-07 Thread Tom Lane
Restore the ability to run pl/pgsql expression queries in parallel. pl/pgsql's notion of an "expression" is very broad, encompassing any SQL SELECT query that returns a single column and no more than one row. So there are cases, for example evaluation of an aggregate function, where the query inv

pgsql: Restore the ability to run pl/pgsql expression queries in parall

2025-07-07 Thread Tom Lane
Restore the ability to run pl/pgsql expression queries in parallel. pl/pgsql's notion of an "expression" is very broad, encompassing any SQL SELECT query that returns a single column and no more than one row. So there are cases, for example evaluation of an aggregate function, where the query inv

pgsql: Restore the ability to run pl/pgsql expression queries in parall

2025-07-07 Thread Tom Lane
Restore the ability to run pl/pgsql expression queries in parallel. pl/pgsql's notion of an "expression" is very broad, encompassing any SQL SELECT query that returns a single column and no more than one row. So there are cases, for example evaluation of an aggregate function, where the query inv

pgsql: Restore the ability to run pl/pgsql expression queries in parall

2025-07-07 Thread Tom Lane
Restore the ability to run pl/pgsql expression queries in parallel. pl/pgsql's notion of an "expression" is very broad, encompassing any SQL SELECT query that returns a single column and no more than one row. So there are cases, for example evaluation of an aggregate function, where the query inv

pgsql: Restore the ability to run pl/pgsql expression queries in parall

2025-07-07 Thread Tom Lane
Restore the ability to run pl/pgsql expression queries in parallel. pl/pgsql's notion of an "expression" is very broad, encompassing any SQL SELECT query that returns a single column and no more than one row. So there are cases, for example evaluation of an aggregate function, where the query inv

pgsql: Refactor some repetitive SLRU code

2025-07-07 Thread Álvaro Herrera
Refactor some repetitive SLRU code Functions to bootstrap and zero pages in various SLRU callers were fairly duplicative. We can slash almost two hundred lines with a couple of simple helpers: - SimpleLruZeroAndWritePage: Does the equivalent of SimpleLruZeroPage followed by flushing the page

pgsql: Standardize LSN formatting by zero padding

2025-07-07 Thread Álvaro Herrera
Standardize LSN formatting by zero padding This commit standardizes the output format for LSNs to ensure consistent representation across various tools and messages. Previously, LSNs were inconsistently printed as `%X/%X` in some contexts, while others used zero-padding. This often led to confus