pgsql: vacuumdb: Add option for analyzing only relations missing stats.

2025-03-06 Thread John Naylor
vacuumdb: Add option for analyzing only relations missing stats. This commit adds a new --missing-only option that can be used in conjunction with --analyze-only and --analyze-in-stages. When this option is specified, vacuumdb will generate ANALYZE commands for a relation if it is missing any sta

pgsql: Revert "vacuumdb: Add option for analyzing only relations missin

2025-03-06 Thread John Naylor
Revert "vacuumdb: Add option for analyzing only relations missing stats." This reverts commit 5f8eb25706b62923c53172e453c8a4dedd877a3d, which in my branch by mistake. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/19e57f4f78e4354d9a21c284868373d28bb0d368 Modified

pgsql: Doc: correct aggressive vacuum threshold for multixact members s

2025-03-06 Thread John Naylor
Doc: correct aggressive vacuum threshold for multixact members storage The threshold is two billion members, which was interpreted as 2GB in the documentation. Fix to reflect that each member takes up five bytes, which translates to about 10GB. This is not exact, because of page boundaries. While

pgsql: Doc: correct aggressive vacuum threshold for multixact members s

2025-03-06 Thread John Naylor
Doc: correct aggressive vacuum threshold for multixact members storage The threshold is two billion members, which was interpreted as 2GB in the documentation. Fix to reflect that each member takes up five bytes, which translates to about 10GB. This is not exact, because of page boundaries. While

pgsql: Doc: correct aggressive vacuum threshold for multixact members s

2025-03-06 Thread John Naylor
Doc: correct aggressive vacuum threshold for multixact members storage The threshold is two billion members, which was interpreted as 2GB in the documentation. Fix to reflect that each member takes up five bytes, which translates to about 10GB. This is not exact, because of page boundaries. While

pgsql: Doc: correct aggressive vacuum threshold for multixact members s

2025-03-06 Thread John Naylor
Doc: correct aggressive vacuum threshold for multixact members storage The threshold is two billion members, which was interpreted as 2GB in the documentation. Fix to reflect that each member takes up five bytes, which translates to about 10GB. This is not exact, because of page boundaries. While

pgsql: reindexdb: move PQfinish() calls to the right place

2025-03-06 Thread Álvaro Herrera
reindexdb: move PQfinish() calls to the right place get_parallel_object_list() has no business closing a connection it did not create. Make things more sensible by closing the connection at the level where it is created, in reindex_one_database(). Extracted from a larger patch by the same author

pgsql: Fix race condition in TAP test 007_pre_auth

2025-03-06 Thread Michael Paquier
Fix race condition in TAP test 007_pre_auth The authentication test added in c76db55c9085 expects a backend to start and wait at the injection point "init-pre-auth". A query is used to retrieve the PID of the backend waiting at authentication, but its WHERE clause was too soft, checking only for

pgsql: valgrind: Adjust suppressions to handle glibc changes

2025-03-06 Thread Andres Freund
valgrind: Adjust suppressions to handle glibc changes In newer glibc versions two additional functions appear between send() and socketcall.send(msg): fun:__internal_syscall_cancel fun:__syscall_cancel Due to that our existing suppression do not work anymore. Use '...', like aleady used in

pgsql: Fix some performance issues in GIN query startup.

2025-03-06 Thread Tom Lane
Fix some performance issues in GIN query startup. If a GIN index search had a lot of search keys (for example, "jsonbcol ?| array[]" with tens of thousands of array elements), both ginFillScanKey() and startScanKey() took O(N^2) time. Worse, those loops were uncancelable for lack of CHECK_FOR_INTE

pgsql: Further fix for json_strip_nulls documentation

2025-03-06 Thread Andrew Dunstan
Further fix for json_strip_nulls documentation Oversight in commit 4603903d294. Author: Shinoda, Noriyoshi (SXD Japan FSI) Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e33969abc1934cc7fd92d539e51a2b8ae46d6a33 Modified Files -- doc/src/sgml/func.sgm

pgsql: Remove extraneous commas in json{b}_strip_nulls documentation

2025-03-06 Thread Andrew Dunstan
Remove extraneous commas in json{b}_strip_nulls documentation Oversight in commit 4603903d294. Author: Ian Lawrence Barwick Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0e76f253f4f0bf3d8a85e88dbea62a09be1f3ff8 Modified Files -- doc/src/sgml/func.sg

pgsql: valgrind: Adjust suppressions to handle glibc changes

2025-03-06 Thread Andres Freund
valgrind: Adjust suppressions to handle glibc changes In newer glibc versions two additional functions appear between send() and socketcall.send(msg): fun:__internal_syscall_cancel fun:__syscall_cancel Due to that our existing suppression do not work anymore. Use '...', like aleady used in

pgsql: Avoid invalidating all RelationSyncCache entries on publication

2025-03-06 Thread Amit Kapila
Avoid invalidating all RelationSyncCache entries on publication change. On change of publication via ALTER PUBLICATION ... SET/ADD/DROP commands, we were invalidating all the relations present in relation sync cache maintained by pgoutput. We need to invalidate only the relation entries that are c