pgsql: Optimize shared memory usage for WaitLSNProcInfo

2025-11-17 Thread Alexander Korotkov
Optimize shared memory usage for WaitLSNProcInfo We need separate pairing heaps for different WaitLSNType's, because there might be waiters for different LSN's at the same time. However, one process can wait only for one type of LSN at a time. So, no need for inHeap and heapNode fields to be arr

pgsql: pg_buffercache: Fix incorrect result cast for relforknumber

2025-11-17 Thread Michael Paquier
pg_buffercache: Fix incorrect result cast for relforknumber pg_buffercache_pages.relforknumber is defined as an int2, but its value was stored with ObjectIdGetDatum() rather than Int16GetDatum() in the result record. Author: Ashutosh Bapat Discussion: https://postgr.es/m/caexhw5s2_qwsdhkpvnuzjr

pgsql: doc: Fix style of description for pg_buffercache_numa.os_page_nu

2025-11-17 Thread Michael Paquier
doc: Fix style of description for pg_buffercache_numa.os_page_num Extracted from a larger patch by the same author. Author: Bertrand Drouvot Discussion: https://postgr.es/m/Z/[email protected] Branch -- master Details --- https://git.postgresql.or

pgsql: Rename two columns in pg_stat_subscription_stats.

2025-11-17 Thread Amit Kapila
Rename two columns in pg_stat_subscription_stats. This patch renames the sync_error_count column to sync_table_error_count in the pg_stat_subscription_stats view. The new name makes the purpose explicit now that a separate column exists to track sequence synchronization errors. Additionally, the

pgsql: Doc: Use markup for sequence fields.

2025-11-17 Thread Amit Kapila
Doc: Use markup for sequence fields. Following commit 980a855c5c, update documentation to use for sequence columns. Previously, these were incorrectly marked up as . Author: Peter Smith Reviewed-by: Chao Li Discussion: https://postgr.es/m/CAHut+PtpDMUE3Kd1p=1ff9pw2hmbgqcpowe_0hd6gs5v2pk...@m

pgsql: doc: clarify that pg_upgrade preserves "optimizer" stats.

2025-11-17 Thread Bruce Momjian
doc: clarify that pg_upgrade preserves "optimizer" stats. Reported-by: Rambabu V Author: Robert Treat Discussion: https://postgr.es/m/CADtiZxrUzRRX6edyN2y-7U5HA8KSXttee7K=eftlxjwg1sc...@mail.gmail.com Backpatch-through: 18 Branch -- REL_18_STABLE Details --- https://git.postgresql.o

pgsql: doc: clarify that pg_upgrade preserves "optimizer" stats.

2025-11-17 Thread Bruce Momjian
doc: clarify that pg_upgrade preserves "optimizer" stats. Reported-by: Rambabu V Author: Robert Treat Discussion: https://postgr.es/m/CADtiZxrUzRRX6edyN2y-7U5HA8KSXttee7K=eftlxjwg1sc...@mail.gmail.com Backpatch-through: 18 Branch -- master Details --- https://git.postgresql.org/pg/c

pgsql: Define PS_USE_CLOBBER_ARGV on GNU/Hurd.

2025-11-17 Thread Thomas Munro
Define PS_USE_CLOBBER_ARGV on GNU/Hurd. This is a backpatch of 32b23664 to v14 and v15. * Remove ancient test for __hurd__, which intended to activate PS_USE_CHANGE_ARGV in these branches but turned out not to be defined on modern systems. * Add new test for__GNU__ to activate PS_USE_CLOBBER

pgsql: Define PS_USE_CLOBBER_ARGV on GNU/Hurd.

2025-11-17 Thread Thomas Munro
Define PS_USE_CLOBBER_ARGV on GNU/Hurd. This is a backpatch of 32b23664 to v14 and v15. * Remove ancient test for __hurd__, which intended to activate PS_USE_CHANGE_ARGV in these branches but turned out not to be defined on modern systems. * Add new test for__GNU__ to activate PS_USE_CLOBBER

pgsql: Use streaming read I/O in BRIN vacuum scan.

2025-11-17 Thread Masahiko Sawada
Use streaming read I/O in BRIN vacuum scan. This commit implements streaming read I/O for BRIN vacuum scans. Although BRIN indexes tend to be relatively small by design, performance tests have shown performance improvements. Author: Arseniy Mukhin Discussion: https://postgr.es/m/CAE7r3ML01aiq9T

pgsql: Fix pg_crc32c_armv8_choose.c to build with ancient glibc release

2025-11-17 Thread Tom Lane
Fix pg_crc32c_armv8_choose.c to build with ancient glibc releases. If you go back as far as the RHEL7 era, does not provide the HWCAPxxx macros needed with elf_aux_info or getauxval, so you need to get those from the kernel header instead. We knew that for the 32-bit case but failed to extrapol

pgsql: Fix pg_crc32c_armv8_choose.c to build with ancient glibc release

2025-11-17 Thread Tom Lane
Fix pg_crc32c_armv8_choose.c to build with ancient glibc releases. If you go back as far as the RHEL7 era, does not provide the HWCAPxxx macros needed with elf_aux_info or getauxval, so you need to get those from the kernel header instead. We knew that for the 32-bit case but failed to extrapol

pgsql: Update .abi-compliance-history for change to CreateStatistics().

2025-11-17 Thread Nathan Bossart
Update .abi-compliance-history for change to CreateStatistics(). As noted in the commit message for 5e4fcbe531, the addition of a second parameter to CreateStatistics() breaks ABI compatibility, but we are unaware of any impacted third-party code. This commit updates .abi-compliance-history accor

pgsql: Update .abi-compliance-history for change to CreateStatistics().

2025-11-17 Thread Nathan Bossart
Update .abi-compliance-history for change to CreateStatistics(). As noted in the commit message for 5e4fcbe531, the addition of a second parameter to CreateStatistics() breaks ABI compatibility, but we are unaware of any impacted third-party code. This commit updates .abi-compliance-history accor

pgsql: Update .abi-compliance-history for change to CreateStatistics().

2025-11-17 Thread Nathan Bossart
Update .abi-compliance-history for change to CreateStatistics(). As noted in the commit message for 5e4fcbe531, the addition of a second parameter to CreateStatistics() breaks ABI compatibility, but we are unaware of any impacted third-party code. This commit updates .abi-compliance-history accor

pgsql: Update .abi-compliance-history for change to CreateStatistics().

2025-11-17 Thread Nathan Bossart
Update .abi-compliance-history for change to CreateStatistics(). As noted in the commit message for 5e4fcbe531, the addition of a second parameter to CreateStatistics() breaks ABI compatibility, but we are unaware of any impacted third-party code. This commit updates .abi-compliance-history accor

pgsql: Update .abi-compliance-history for change to CreateStatistics().

2025-11-17 Thread Nathan Bossart
Update .abi-compliance-history for change to CreateStatistics(). As noted in the commit message for 5e4fcbe531, the addition of a second parameter to CreateStatistics() breaks ABI compatibility, but we are unaware of any impacted third-party code. This commit updates .abi-compliance-history accor

pgsql: Clean up match_orclause_to_indexcol().

2025-11-17 Thread Tom Lane
Clean up match_orclause_to_indexcol(). Remove bogus stripping of RelabelTypes: that can result in building an output SAOP tree with incorrect exposed exprType for the operands, which might confuse polymorphic operators. Moreover it demonstrably prevents folding some OR-trees to SAOPs when the RHS

pgsql: Clean up match_orclause_to_indexcol().

2025-11-17 Thread Tom Lane
Clean up match_orclause_to_indexcol(). Remove bogus stripping of RelabelTypes: that can result in building an output SAOP tree with incorrect exposed exprType for the operands, which might confuse polymorphic operators. Moreover it demonstrably prevents folding some OR-trees to SAOPs when the RHS

pgsql: doc: Document default values for some pg_recvlogical options.

2025-11-17 Thread Fujii Masao
doc: Document default values for some pg_recvlogical options. The documentation did not previously mention the default values for the --fsync-interval and --plugin options, even though pg_recvlogical --help shows them. This omission made it harder for users to understand the tool's behavior from t

pgsql: Fix typos in logical replication code comments

2025-11-17 Thread Daniel Gustafsson
Fix typos in logical replication code comments Author: Chao Li Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/caeowx2kt8m7wv39_zobds5snxx9eakdqb5cpshk7bxw6js4...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ab805989b2ee500cfa060e

pgsql: Mention md5 deprecation in postgresql.conf.sample

2025-11-17 Thread Daniel Gustafsson
Mention md5 deprecation in postgresql.conf.sample PostgreSQL 18 deprecated password_encryption='md5', but the comments for this GUC in the sample configuration file did not mention the deprecation. Update comments with a notice to make as many users as possible aware of it. Also add a comment to

pgsql: Mention md5 deprecation in postgresql.conf.sample

2025-11-17 Thread Daniel Gustafsson
Mention md5 deprecation in postgresql.conf.sample PostgreSQL 18 deprecated password_encryption='md5', but the comments for this GUC in the sample configuration file did not mention the deprecation. Update comments with a notice to make as many users as possible aware of it. Also add a comment to