pgsql: Address stats import review comments.

2025-03-05 Thread Jeff Davis
Address stats import review comments. Reported-by: jian he Discussion: https://postgr.es/m/cacjufxhg9mbqozbjq4jrbcrbuo+t+sx4qlzx092rs_9b4sr...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/298944e8d80252820531309e5b73d7de7d85e2df Modified Files -

pgsql: Fix compiler warnings about typedef redefinitions

2025-03-05 Thread Heikki Linnakangas
Fix compiler warnings about typedef redefinitions Clang with -Wtypedef-redefinition produced warnings: src/include/storage/latch.h:122:3: error: redefinition of typedef 'Latch' is a C11 feature [-Werror,-Wtypedef-redefinition] Per buildfarm Branch -- master Details --- https://git

pgsql: Add more monitoring data for WAL writes in the WAL receiver

2025-03-05 Thread Michael Paquier
Add more monitoring data for WAL writes in the WAL receiver This commit adds two improvements related to the monitoring of WAL writes for the WAL receiver. First, write counts and timings are now counted in pg_stat_io for the WAL receiver. These have been discarded from pg_stat_wal in ff99918c62

pgsql: Use ModifyWaitEvent to update exit_on_postmaster_death

2025-03-05 Thread Heikki Linnakangas
Use ModifyWaitEvent to update exit_on_postmaster_death This is in preparation for splitting WaitEventSet related functions to a separate source file. That will hide the details of WaitEventSet from WaitLatch, so it must use an exposed function instead of modifying WaitEventSet->exit_on_postmaster_

pgsql: Split WaitEventSet functions to separate source file

2025-03-05 Thread Heikki Linnakangas
Split WaitEventSet functions to separate source file latch.c now only contains the Latch related functions, which build on the WaitEventSet abstraction. Most of the platform-dependent stuff is now in waiteventset.c. Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/message-id/8a

pgsql: ecpg: Fix compiler warning in ecpg build with Meson.

2025-03-05 Thread Fujii Masao
ecpg: Fix compiler warning in ecpg build with Meson. Previously, Meson could produce a warning about the use of 'deps' in ecpg: WARNING: Project targets '>=0.54' but uses a feature introduced in '0.60.0': list.. The right-hand operand was not a list. The right-hand operand of 'deps' should

pgsql: Remove unused ShutdownLatchSupport() function

2025-03-05 Thread Heikki Linnakangas
Remove unused ShutdownLatchSupport() function The only caller was removed in commit 80a8f95b3b. I don't foresee needing it any time soon, and I'm working on some big changes in this area, so let's remove it out of the way. Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/messag

pgsql: ci: Remove installation of libcurl

2025-03-05 Thread Daniel Gustafsson
ci: Remove installation of libcurl The CI images come with libcurl pre-installed since commit a119426 in the pg-vm-images repository so remove the installation commands from the Cirrus tasks. Installation of libcurl packages was added in the OAuth patchset which introduced the dependency, a backp

pgsql: ci: freebsd: Specify debug_parallel_query=regress

2025-03-05 Thread Andres Freund
ci: freebsd: Specify debug_parallel_query=regress A lot of buildfarm animals run with debug_parallel_query=regress, while CI didn't test that. That lead to the annoying situation of only noticing related test instabilities after merging changes upstream. FreeBSD was chosen because it's a relative

pgsql: ci: Document what makes certain tasks special

2025-03-05 Thread Andres Freund
ci: Document what makes certain tasks special To increase coverage without drastically increasing CI resource usage, we have different CI tasks test different things (e.g. the linux tasks use sanitizers). Unfortunately that can create confusing situations where CI fails on some OS, but not others

pgsql: ci: Upgrade FreeBSD image

2025-03-05 Thread Andres Freund
ci: Upgrade FreeBSD image Upgrade to the current stable version. To avoid needing commits like this in the future, the CI image name now doesn't contain the OS version number anymore. Backpatch to all versions with CI support, we don't want to generate CI images for multiple FreeBSD versions. Au

pgsql: ci: Upgrade FreeBSD image

2025-03-05 Thread Andres Freund
ci: Upgrade FreeBSD image Upgrade to the current stable version. To avoid needing commits like this in the future, the CI image name now doesn't contain the OS version number anymore. Backpatch to all versions with CI support, we don't want to generate CI images for multiple FreeBSD versions. Au

pgsql: ci: Upgrade FreeBSD image

2025-03-05 Thread Andres Freund
ci: Upgrade FreeBSD image Upgrade to the current stable version. To avoid needing commits like this in the future, the CI image name now doesn't contain the OS version number anymore. Backpatch to all versions with CI support, we don't want to generate CI images for multiple FreeBSD versions. Au

pgsql: ci: Upgrade FreeBSD image

2025-03-05 Thread Andres Freund
ci: Upgrade FreeBSD image Upgrade to the current stable version. To avoid needing commits like this in the future, the CI image name now doesn't contain the OS version number anymore. Backpatch to all versions with CI support, we don't want to generate CI images for multiple FreeBSD versions. Au

pgsql: Revert "Show index search count in EXPLAIN ANALYZE."

2025-03-05 Thread Peter Geoghegan
Revert "Show index search count in EXPLAIN ANALYZE." This reverts commit 5ead85fbc81162ab1594f656b036a22e814f96b3. This commit shows test failures with debug_parallel_query=regress. The underlying issue needs to be debugged, so revert for now. Branch -- master Details --- https://git.p

Re: pgsql: Show index search count in EXPLAIN ANALYZE.

2025-03-05 Thread Peter Geoghegan
On Wed, Mar 5, 2025 at 9:37 AM Peter Geoghegan wrote: > Show index search count in EXPLAIN ANALYZE. I'm aware of the fact that there are currently buildfarm failures due to test flappiness. I'll work to fix the issues today. If I am unable to find a resolution within a few hours, then I'll rever

pgsql: Allow json{b}_strip_nulls to remove null array elements

2025-03-05 Thread Andrew Dunstan
Allow json{b}_strip_nulls to remove null array elements An additional paramater ("strip_in_arrays") is added to these functions. It defaults to false. If true, then null array elements are removed as well as null valued object fields. JSON that just consists of a single null is not affected. Auth

pgsql: Show index search count in EXPLAIN ANALYZE.

2025-03-05 Thread Peter Geoghegan
Show index search count in EXPLAIN ANALYZE. Expose the count of index searches/index descents in EXPLAIN ANALYZE's output for index scan nodes. This information is particularly useful with scans that use ScalarArrayOp quals, where the number of index scans isn't predictable in advance (at least n

pgsql: Rename some signal and interrupt handling functions for consiste

2025-03-05 Thread Heikki Linnakangas
Rename some signal and interrupt handling functions for consistency The usual pattern for handling a signal is that the signal handler sets a flag and calls SetLatch(MyLatch), and CHECK_FOR_INTERRUPTS() or other code that is part of a wait loop calls another function to deal with it. The naming of

pgsql: Add ALTER TABLE ... ALTER CONSTRAINT ... SET [NO] INHERIT

2025-03-05 Thread Álvaro Herrera
Add ALTER TABLE ... ALTER CONSTRAINT ... SET [NO] INHERIT This allows to redefine an existing non-inheritable constraint to be inheritable, which allows to straighten up situations with NO INHERIT constraints so that thay can become normal constraints without having to re-verify existing data. Fo