Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Michael Paquier
On Wed, Dec 10, 2025 at 01:05:39PM +0900, Michael Paquier wrote: > All that should be now addressed with 1d7b00dc14b8 (down to v17) and > 06817fc8a4b7 (HEAD only for nbtree). Let's see what the buildfarm > thinks. And crake is now green. Thanks all for the discussion. -- Michael signature.asc

pgsql: libpq: Authorize pthread_exit() in libpq_check

2025-12-09 Thread Michael Paquier
libpq: Authorize pthread_exit() in libpq_check pthread_exit() is added to the list of symbols allowed when building libpq. This has been reported as possible when libpq is statically linked to libcrypto, where pthread_exit() could be called. Reported-by: Torsten Rupp Author: Nazir Bilal Yavuz

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Michael Paquier
On Wed, Dec 10, 2025 at 08:43:10AM +0900, Michael Paquier wrote: > I am not going to touch this line, but I don't mind doing something > about it as I am touching the same area. Another thing: the nbtree > module is missing a .gitignore. All that should be now addressed with 1d7b00dc14b8 (down to

pgsql: Fix failures with cross-version pg_upgrade tests

2025-12-09 Thread Michael Paquier
Fix failures with cross-version pg_upgrade tests Buildfarm members skimmer and crake have reported that pg_upgrade running from v18 fails due to the changes of d52c24b0f808, with the expectations that the objects removed in the test module injection_points should still be present post upgrades, bu

pgsql: Fix failures with cross-version pg_upgrade tests

2025-12-09 Thread Michael Paquier
Fix failures with cross-version pg_upgrade tests Buildfarm members skimmer and crake have reported that pg_upgrade running from v18 fails due to the changes of d52c24b0f808, with the expectations that the objects removed in the test module injection_points should still be present post upgrades, bu

pgsql: Fix failures with cross-version pg_upgrade tests

2025-12-09 Thread Michael Paquier
Fix failures with cross-version pg_upgrade tests Buildfarm members skimmer and crake have reported that pg_upgrade running from v18 fails due to the changes of d52c24b0f808, with the expectations that the objects removed in the test module injection_points should still be present post upgrades, bu

pgsql: Fix two issues with recently-introduced nbtree test

2025-12-09 Thread Michael Paquier
Fix two issues with recently-introduced nbtree test REGRESS has forgotten about the test nbtree_half_dead_pages, and a .gitignore was missing from the module. Oversights in c085aab27819 for REGRESS and 1e4e5783e7d7 for the missing .gitignore. Discussion: https://postgr.es/m/atipja1y1zvsm...@paqu

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Michael Paquier
On Wed, Dec 10, 2025 at 01:04:31AM +0200, Heikki Linnakangas wrote: > Yes please. I'm also happy to help if you'd like. I'm eagerly waiting to see > if the "Widen MultiXactOffset to 64 bits" commit caused any new > cross-version pg_ugprade test failures. Okay, I'll see about doing something. By t

pgsql: Fix meson warning due to missing declaration of NM

2025-12-09 Thread Michael Paquier
Fix meson warning due to missing declaration of NM The warning was showing up in the early stages of the meson build, when the contents of Makefile.global is generated based on the configuration of meson for PGXS. NM is added to pgxs_empty. This declaration is only used internally for the libpq

pgsql: Fix typo in comment

2025-12-09 Thread Heikki Linnakangas
Fix typo in comment Author: Xuneng Zhou Reviewed-by: Chao Li Discussion: https://www.postgresql.org/message-id/cabptf7v8cboxgepqrad6eh3om7drhnio3c0rq-62uut7rdu...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bae9d2f892bc7733667fa68f416b5abd8dd2f

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Heikki Linnakangas
On 10/12/2025 00:56, Michael Paquier wrote: On Tue, Dec 09, 2025 at 05:49:24PM -0500, Tom Lane wrote: They are updated when a new BF run is made for that branch, so back-patching the DROP EXTENSION commands should do the trick. Okay, good to know. Let's do that then. Encouraging a setup and

pgsql: Fix misleading comment in tuplesort.c

2025-12-09 Thread David Rowley
Fix misleading comment in tuplesort.c A comment in tuplesort.c was claiming that the code was defining INITIAL_MEMTUPSIZE so that it *does not* exceed ALLOCSET_SEPARATE_THRESHOLD, but the code actually ensures that we purposefully *do* exceed ALLOCSET_SEPARATE_THRESHOLD for the initial allocation

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Michael Paquier
On Tue, Dec 09, 2025 at 05:49:24PM -0500, Tom Lane wrote: > They are updated when a new BF run is made for that branch, so > back-patching the DROP EXTENSION commands should do the trick. Okay, good to know. Let's do that then. Encouraging a setup and a cleanup step seems like a good thing here,

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Tom Lane
Michael Paquier writes: > Are the dumps of the old versions used in the buildfarm runs updated > with each run? They are updated when a new BF run is made for that branch, so back-patching the DROP EXTENSION commands should do the trick. regards, tom lane

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Michael Paquier
On Tue, Dec 09, 2025 at 10:04:43PM +0200, Heikki Linnakangas wrote: > It's a little tricky if a module has more than one test that uses the > extension. Namely src/test/modules/nbtree which I added recently has two > test scripts, nbtree_incomplete_splits.sql and nbtree_half_dead_pages.sql, > and b

pgsql: Use palloc_object() and palloc_array() in backend code

2025-12-09 Thread Michael Paquier
Use palloc_object() and palloc_array() in backend code The idea is to encourage more the use of these new routines across the tree, as these offer stronger type safety guarantees than palloc(). This batch of changes includes most of the trivial changes suggested by the author for src/backend/. A

pgsql: Fix O_CLOEXEC flag handling in Windows port.

2025-12-09 Thread Thomas Munro
Fix O_CLOEXEC flag handling in Windows port. PostgreSQL's src/port/open.c has always set bInheritHandle = TRUE when opening files on Windows, making all file descriptors inheritable by child processes. This meant the O_CLOEXEC flag, added to many call sites by commit 1da569ca1f (v16), was silentl

pgsql: Fix O_CLOEXEC flag handling in Windows port.

2025-12-09 Thread Thomas Munro
Fix O_CLOEXEC flag handling in Windows port. PostgreSQL's src/port/open.c has always set bInheritHandle = TRUE when opening files on Windows, making all file descriptors inheritable by child processes. This meant the O_CLOEXEC flag, added to many call sites by commit 1da569ca1f (v16), was silentl

pgsql: Fix O_CLOEXEC flag handling in Windows port.

2025-12-09 Thread Thomas Munro
Fix O_CLOEXEC flag handling in Windows port. PostgreSQL's src/port/open.c has always set bInheritHandle = TRUE when opening files on Windows, making all file descriptors inheritable by child processes. This meant the O_CLOEXEC flag, added to many call sites by commit 1da569ca1f (v16), was silentl

pgsql: Fix O_CLOEXEC flag handling in Windows port.

2025-12-09 Thread Thomas Munro
Fix O_CLOEXEC flag handling in Windows port. PostgreSQL's src/port/open.c has always set bInheritHandle = TRUE when opening files on Windows, making all file descriptors inheritable by child processes. This meant the O_CLOEXEC flag, added to many call sites by commit 1da569ca1f (v16), was silentl

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Heikki Linnakangas
On 09/12/2025 19:40, Tom Lane wrote: Perhaps another alternative is to add "DROP EXTENSION injection_points" at the end of the test scripts in the problematic modules. It's a little tricky if a module has more than one test that uses the extension. Namely src/test/modules/nbtree which I added

pgsql: vacuumdb: Move some variables to the vacuumingOptions struct.

2025-12-09 Thread Nathan Bossart
vacuumdb: Move some variables to the vacuumingOptions struct. Presently, the "echo" and "quiet" variables are carted around to various functions, which is a bit tedious. To simplify things, this commit moves them into the vacuumingOptions struct and removes the related function parameters. While

pgsql: Add ParallelSlotSetIdle().

2025-12-09 Thread Nathan Bossart
Add ParallelSlotSetIdle(). This commit refactors the code for marking a ParallelSlot as idle to a new static inline function. This can be used to mark a slot that was obtained via ParallelSlotGetIdle() but that we don't intend to actually use for a query as idle again. This is preparatory work f

pgsql: vacuumdb: Add --dry-run.

2025-12-09 Thread Nathan Bossart
vacuumdb: Add --dry-run. This new option instructs vacuumdb to print, but not execute, the VACUUM and ANALYZE commands that would've been sent to the server. Author: Corey Huinker Reviewed-by: Chao Li Reviewed-by: Kirill Reshke Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/CADk

pgsql: Add started_by column to pg_stat_progress_analyze view.

2025-12-09 Thread Masahiko Sawada
Add started_by column to pg_stat_progress_analyze view. The new column, started_by, indicates the initiator of the analyze ('manual' or 'autovacuum'), helping users and monitoring tools to better understand ANALYZE behavior. Bump catalog version. Author: Shinya Kato Reviewed-by: Masahiko Sawada

pgsql: Add mode and started_by columns to pg_stat_progress_vacuum view.

2025-12-09 Thread Masahiko Sawada
Add mode and started_by columns to pg_stat_progress_vacuum view. The new columns, mode and started_by, indicate the vacuum mode ('normal', 'aggressive', or 'failsafe') and the initiator of the vacuum ('manual', 'autovacuum', or 'autovacuum_wraparound'), respectively. This allows users and monitori

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Tom Lane
Heikki Linnakangas writes: > Hmm, using the first value of REGRESS is surprising. How about we change > the autoconf logic to match what meson does? As attached. Unless you want to back-patch that as far as 9.2, it's going to make matters worse not better for predictability of the DB names in th

pgsql: doc: Fix titles of some pg_buffercache functions.

2025-12-09 Thread Nathan Bossart
doc: Fix titles of some pg_buffercache functions. As in commit 59d6c03956, use rather than in the to be consistent with how other functions in this module are documented. Oversights in commits dcf7e1697b and 9ccc049dfe. Author: Noboru Saito Discussion: https://postgr.es/m/CAAM3qn%2B7KraFkCy

pgsql: doc: Fix titles of some pg_buffercache functions.

2025-12-09 Thread Nathan Bossart
doc: Fix titles of some pg_buffercache functions. As in commit 59d6c03956, use rather than in the to be consistent with how other functions in this module are documented. Oversights in commits dcf7e1697b and 9ccc049dfe. Author: Noboru Saito Discussion: https://postgr.es/m/CAAM3qn%2B7KraFkCy

pgsql: Support "j" length modifier in snprintf.c.

2025-12-09 Thread Tom Lane
Support "j" length modifier in snprintf.c. POSIX has for a long time defined the "j" length modifier for printf conversions as meaning the size of intmax_t or uintmax_t. We got away without supporting that so far, because we were not using intmax_t anywhere. However, commit e6be84356 re-introduce

pgsql: Add wait event for the group commit delay before WAL flush

2025-12-09 Thread Heikki Linnakangas
Add wait event for the group commit delay before WAL flush Author: Rafia Sabih Reviewed-by: Sami Imseih Discussion: https://www.postgresql.org/message-id/ca%2bfpmff-hwxtrc0q3cr_xo78zup_m_vc5xgwpoyokwqod0t...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/com

Re: pgsql: injection_points: Remove portions related to custom pgstats

2025-12-09 Thread Heikki Linnakangas
On 08/12/2025 10:41, Michael Paquier wrote: On Sun, Dec 07, 2025 at 11:57:34PM -0500, Tom Lane wrote: Nah, hold off till we have a discussion about whether the test is correct to expect compatibility. We can afford to have a couple of BF animals unhappy for a day or two while we come to a decis

pgsql: Fix warning about wrong format specifier for off_t type

2025-12-09 Thread Heikki Linnakangas
Fix warning about wrong format specifier for off_t type Per OS X buildfarm members. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f231a4e8c7f2ce93203cedea7a02ef3eeb744647 Modified Files -- src/bin/pg_upgrade/slru_io.c | 7 --- 1 file changed, 4 ins

pgsql: Move pg_multixact SLRU page format definitions to a separate hea

2025-12-09 Thread Heikki Linnakangas
Move pg_multixact SLRU page format definitions to a separate header This makes them accessible from pg_upgrade, needed by the next commit. I'm doing this mechanical move as a separate commit to make the next commit's changes to these definitions more obvious. Author: Maxim Orlov Discussion: htt

pgsql: Widen MultiXactOffset to 64 bits

2025-12-09 Thread Heikki Linnakangas
Widen MultiXactOffset to 64 bits This eliminates MultiXactOffset wraparound and the 2^32 limit on the total number of multixid members. Multixids are still limited to 2^31, but this is a nice improvement because 'members' can grow much faster than the number of multixids. On such systems, you can

pgsql: doc: Fix statement about ON CONFLICT and deferrable constraints.

2025-12-09 Thread Dean Rasheed
doc: Fix statement about ON CONFLICT and deferrable constraints. The description of deferrable constraints in create_table.sgml states that deferrable constraints cannot be used as conflict arbitrators in an INSERT with an ON CONFLICT DO UPDATE clause, but in fact this restriction applies to all O

pgsql: doc: Fix statement about ON CONFLICT and deferrable constraints.

2025-12-09 Thread Dean Rasheed
doc: Fix statement about ON CONFLICT and deferrable constraints. The description of deferrable constraints in create_table.sgml states that deferrable constraints cannot be used as conflict arbitrators in an INSERT with an ON CONFLICT DO UPDATE clause, but in fact this restriction applies to all O

pgsql: doc: Fix statement about ON CONFLICT and deferrable constraints.

2025-12-09 Thread Dean Rasheed
doc: Fix statement about ON CONFLICT and deferrable constraints. The description of deferrable constraints in create_table.sgml states that deferrable constraints cannot be used as conflict arbitrators in an INSERT with an ON CONFLICT DO UPDATE clause, but in fact this restriction applies to all O

pgsql: doc: Fix statement about ON CONFLICT and deferrable constraints.

2025-12-09 Thread Dean Rasheed
doc: Fix statement about ON CONFLICT and deferrable constraints. The description of deferrable constraints in create_table.sgml states that deferrable constraints cannot be used as conflict arbitrators in an INSERT with an ON CONFLICT DO UPDATE clause, but in fact this restriction applies to all O

pgsql: doc: Fix statement about ON CONFLICT and deferrable constraints.

2025-12-09 Thread Dean Rasheed
doc: Fix statement about ON CONFLICT and deferrable constraints. The description of deferrable constraints in create_table.sgml states that deferrable constraints cannot be used as conflict arbitrators in an INSERT with an ON CONFLICT DO UPDATE clause, but in fact this restriction applies to all O

pgsql: doc: Fix statement about ON CONFLICT and deferrable constraints.

2025-12-09 Thread Dean Rasheed
doc: Fix statement about ON CONFLICT and deferrable constraints. The description of deferrable constraints in create_table.sgml states that deferrable constraints cannot be used as conflict arbitrators in an INSERT with an ON CONFLICT DO UPDATE clause, but in fact this restriction applies to all O

pgsql: Fix distinctness check for queries with grouping sets

2025-12-09 Thread Richard Guo
Fix distinctness check for queries with grouping sets query_is_distinct_for() is intended to determine whether a query never returns duplicates of the specified columns. For queries using grouping sets, if there are no grouping expressions, the query may contain one or more empty grouping sets.