pgsql: Fix a compiler warning in initStringInfo().

2025-01-10 Thread Tatsuo Ishii
Fix a compiler warning in initStringInfo(). Fix a compiler warning found by Cfbot. This was caused by commit bb86e85e442. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/72ceb21b029433dd82f29182894dce63e639b4d4 Modified Files -- src/common/stringinfo.c

pgsql: Fix redefinition of type in commit e0ece2a981.

2025-01-10 Thread Jeff Davis
Fix redefinition of type in commit e0ece2a981. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ceb2855522940d5aaae4c6e5eed493d60e3196ce Modified Files -- src/backend/executor/execGrouping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: TupleHashTable: store additional data along with tuple.

2025-01-10 Thread Jeff Davis
TupleHashTable: store additional data along with tuple. Previously, the caller needed to allocate the memory and the TupleHashTable would store a pointer to it. That wastes space for the palloc overhead as well as the size of the pointer itself. Now, the TupleHashTable relies on the caller to cor

pgsql: Make verify_compact_attribute available in non-assert builds

2025-01-10 Thread David Rowley
Make verify_compact_attribute available in non-assert builds 6f3820f37 adjusted the assert-enabled validation of the CompactAttribute to call a new external function to perform the validation. That commit made it so the function was only available when building with USE_ASSERT_CHECKING, and becau

pgsql: Add new StringInfo APIs to allow callers to specify the buffer s

2025-01-10 Thread Tatsuo Ishii
Add new StringInfo APIs to allow callers to specify the buffer size. Previously StringInfo APIs allocated buffers with fixed initial allocation size of 1024 bytes. This may be too large and inappropriate for some callers that can do with smaller memory buffers. To fix this, introduce new APIs that

pgsql: Consolidate docs for vacuum-related GUCs in new subsection

2025-01-10 Thread Melanie Plageman
Consolidate docs for vacuum-related GUCs in new subsection GUCs related to vacuum's freezing behavior were documented in a subsection of the Client Connection Defaults documentation. These GUCs don't belong there, as they affect the freezing behavior of all vacuums -- including autovacuums. There

pgsql: Fix missing ldapscheme option in pg_hba_file_rules()

2025-01-10 Thread Daniel Gustafsson
Fix missing ldapscheme option in pg_hba_file_rules() The ldapscheme option was missed when inspecing the HbaLine for assembling rows for the pg_hba_file_rules function. Backpatch to all supported versions. Author: Laurenz Albe Reported-by: Laurenz Albe Reviewed-by: Daniel Gustafsson Bug: 1876

pgsql: Fix missing ldapscheme option in pg_hba_file_rules()

2025-01-10 Thread Daniel Gustafsson
Fix missing ldapscheme option in pg_hba_file_rules() The ldapscheme option was missed when inspecing the HbaLine for assembling rows for the pg_hba_file_rules function. Backpatch to all supported versions. Author: Laurenz Albe Reported-by: Laurenz Albe Reviewed-by: Daniel Gustafsson Bug: 1876

pgsql: Fix missing ldapscheme option in pg_hba_file_rules()

2025-01-10 Thread Daniel Gustafsson
Fix missing ldapscheme option in pg_hba_file_rules() The ldapscheme option was missed when inspecing the HbaLine for assembling rows for the pg_hba_file_rules function. Backpatch to all supported versions. Author: Laurenz Albe Reported-by: Laurenz Albe Reviewed-by: Daniel Gustafsson Bug: 1876

pgsql: Fix missing ldapscheme option in pg_hba_file_rules()

2025-01-10 Thread Daniel Gustafsson
Fix missing ldapscheme option in pg_hba_file_rules() The ldapscheme option was missed when inspecing the HbaLine for assembling rows for the pg_hba_file_rules function. Backpatch to all supported versions. Author: Laurenz Albe Reported-by: Laurenz Albe Reviewed-by: Daniel Gustafsson Bug: 1876

pgsql: Fix missing ldapscheme option in pg_hba_file_rules()

2025-01-10 Thread Daniel Gustafsson
Fix missing ldapscheme option in pg_hba_file_rules() The ldapscheme option was missed when inspecing the HbaLine for assembling rows for the pg_hba_file_rules function. Backpatch to all supported versions. Author: Laurenz Albe Reported-by: Laurenz Albe Reviewed-by: Daniel Gustafsson Bug: 1876

pgsql: Fix missing ldapscheme option in pg_hba_file_rules()

2025-01-10 Thread Daniel Gustafsson
Fix missing ldapscheme option in pg_hba_file_rules() The ldapscheme option was missed when inspecing the HbaLine for assembling rows for the pg_hba_file_rules function. Backpatch to all supported versions. Author: Laurenz Albe Reported-by: Laurenz Albe Reviewed-by: Daniel Gustafsson Bug: 1876

pgsql: Fix obsolete nbtree README left link remarks.

2025-01-10 Thread Peter Geoghegan
Fix obsolete nbtree README left link remarks. Oversight in commit 1bd4bc85, which made nbtree backwards scans operate off of a copy of each page's left link as of the time of its call to _bt_readpage. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5b14ec0a48cca3add

pgsql: Use a non-locking initial test in TAS_SPIN on AArch64.

2025-01-10 Thread Nathan Bossart
Use a non-locking initial test in TAS_SPIN on AArch64. Our testing showed that this is helpful at sufficiently high contention levels and doesn't hurt performance on smaller machines. The new TAS_SPIN macro for AArch64 is identical to the ones added for PPC and x86_64 (see commits bc2a050d40 and b

pgsql: postmaster: Introduce variadic btmask_all_except()

2025-01-10 Thread Andres Freund
postmaster: Introduce variadic btmask_all_except() Upcoming patches would otherwise need btmask_all_except3(). Reviewed-by: Heikki Linnakangas Discussion: https://postgr.es/m/w3z6w3g4aovivs735nk4pzjhmegntecesm3kktpebchegm5o53@aonnq2kn27xi Branch -- master Details --- https://git.postg

pgsql: postmaster: Update pmState via a wrapper function

2025-01-10 Thread Andres Freund
postmaster: Update pmState via a wrapper function This makes logging of state changes easier - state transitions are now logged at DEBUG1. Without that logging it was surprisingly hard to understand the current state of the system while debugging. Reviewed-by: Heikki Linnakangas Reviewed-by: Ber

pgsql: postmaster: Rename some shutdown related PMState phase names

2025-01-10 Thread Andres Freund
postmaster: Rename some shutdown related PMState phase names The previous names weren't particularly clear. Future patches will add more shutdown phases, making it even more important to have understandable shutdown phases. Suggested-by: Heikki Linnakangas Reviewed-by: Nazir Bilal Yavuz Discuss

pgsql: postmaster: Improve logging of signals sent by postmaster

2025-01-10 Thread Andres Freund
postmaster: Improve logging of signals sent by postmaster Previously many, in some cases important, signals we never logged. In other cases the signal name was only included numerically. As part of this, change the debug log level the signal is logged at to DEBUG3, previously some where DEBUG2, s

pgsql: postmaster: Make btmask_add() variadic

2025-01-10 Thread Andres Freund
postmaster: Make btmask_add() variadic Suggested-by: Heikki Linnakangas Discussion: https://postgr.es/m/d2cd8fd3-396a-4390-8f0b-74be65e72...@iki.fi Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e84712c73820839abfaa29c20cee0d3cabbf8f1c Modified Files

pgsql: Adjust signature of cluster_rel() and its subroutines

2025-01-10 Thread Álvaro Herrera
Adjust signature of cluster_rel() and its subroutines cluster_rel() receives the OID of the relation to process, which it opens and locks; but then its subroutine copy_table_data() also receives the relation OID and opens it by itself. This is a bit wasteful. It's better to have cluster_rel() re