pgsql: Bump PGSTAT_FILE_FORMAT_ID

2025-01-13 Thread Michael Paquier
Bump PGSTAT_FILE_FORMAT_ID Oversight in f92c854cf406, that has changed the definition of PgStat_BktypeIO, impacting PgStat_IO which is the on-disk data for IO pgstats data. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ce9a74707d4cf7768cff06298d09c7f7e823341d Mod

pgsql: Fix potential integer overflow in bringetbitmap()

2025-01-13 Thread Michael Paquier
Fix potential integer overflow in bringetbitmap() This function expects an "int64" as result and stores the number of pages to add to the index scan bitmap as an "int", multiplying its final result by 10. For a relation large enough, this can theoretically overflow if counting more than (INT32_MA

pgsql: Fix potential integer overflow in bringetbitmap()

2025-01-13 Thread Michael Paquier
Fix potential integer overflow in bringetbitmap() This function expects an "int64" as result and stores the number of pages to add to the index scan bitmap as an "int", multiplying its final result by 10. For a relation large enough, this can theoretically overflow if counting more than (INT32_MA

pgsql: Fix potential integer overflow in bringetbitmap()

2025-01-13 Thread Michael Paquier
Fix potential integer overflow in bringetbitmap() This function expects an "int64" as result and stores the number of pages to add to the index scan bitmap as an "int", multiplying its final result by 10. For a relation large enough, this can theoretically overflow if counting more than (INT32_MA

pgsql: Fix potential integer overflow in bringetbitmap()

2025-01-13 Thread Michael Paquier
Fix potential integer overflow in bringetbitmap() This function expects an "int64" as result and stores the number of pages to add to the index scan bitmap as an "int", multiplying its final result by 10. For a relation large enough, this can theoretically overflow if counting more than (INT32_MA

pgsql: Fix potential integer overflow in bringetbitmap()

2025-01-13 Thread Michael Paquier
Fix potential integer overflow in bringetbitmap() This function expects an "int64" as result and stores the number of pages to add to the index scan bitmap as an "int", multiplying its final result by 10. For a relation large enough, this can theoretically overflow if counting more than (INT32_MA

pgsql: Fix potential integer overflow in bringetbitmap()

2025-01-13 Thread Michael Paquier
Fix potential integer overflow in bringetbitmap() This function expects an "int64" as result and stores the number of pages to add to the index scan bitmap as an "int", multiplying its final result by 10. For a relation large enough, this can theoretically overflow if counting more than (INT32_MA

pgsql: Move information about pgstats kinds into its own header pgstat_

2025-01-13 Thread Michael Paquier
Move information about pgstats kinds into its own header pgstat_kind.h This includes all the definitions for the various PGSTAT_KIND_* values, the range allowed for custom stats kinds and some macros related all that. One use-case behind this split is the possibility to use this information for f

pgsql: Remove assertion in pgstat_count_io_op()

2025-01-13 Thread Michael Paquier
Remove assertion in pgstat_count_io_op() An equivalent check is done with pgstat_is_ioop_tracked_in_bytes(), so there is no need for this extra one. Small cleanup that should have been included in f92c854cf406. Author: Nazir Bilal Yavuz Reviewed-by: Bertrand Drouvot Discussion: https://postgr.e

pgsql: Make pg_stat_io count IOs as bytes instead of blocks for some op

2025-01-13 Thread Michael Paquier
Make pg_stat_io count IOs as bytes instead of blocks for some operations Currently in pg_stat_io view, IOs are counted as blocks of size BLCKSZ. There are two limitations with this design: * The actual number of I/O requests sent to the kernel is lower because I/O requests may be merged before be

pgsql: Revert "TupleHashTable: store additional data along with tuple."

2025-01-13 Thread Jeff Davis
Revert "TupleHashTable: store additional data along with tuple." This reverts commit e0ece2a981ee9068f50c4423e303836c2585eb02 due to performance regressions. Reported-by: David Rowley Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b4a07f532b40a64fb4714a3f7ab606343

pgsql: Reorder vacuum GUCs in postgresql.conf.sample to match docs

2025-01-13 Thread Melanie Plageman
Reorder vacuum GUCs in postgresql.conf.sample to match docs ca9c6a5680d consolidated most of vacuum-related GUCs' documentation into a new subsection. It neglected, however, to reorganize postgresql.conf.sample to match the new order. Do this now. Reported-by: Álvaro Herrera Discussion: https://p

pgsql: Add BTOPTIONS_PROC comments to nbtree.h.

2025-01-13 Thread Peter Geoghegan
Add BTOPTIONS_PROC comments to nbtree.h. Add comments explaining the purpose of B-Tree support function 5 to nbtree.h for consistency (all other support functions were already described by nearby comments). This fixes what was arguably an oversight in commit 911e702077, or in follow-up doc commit

pgsql: Move nbtree preprocessing into new .c file.

2025-01-13 Thread Peter Geoghegan
Move nbtree preprocessing into new .c file. Quite a bit of code within nbtutils.c is only called during nbtree preprocessing. Move that code into a new .c file, nbtpreprocesskeys.c. Also reorder some of the functions within the new file for clarity. This commit has no functional impact. It is s

pgsql: Add commit 6e826278f1 to .git-blame-ignore-revs.

2025-01-13 Thread Nathan Bossart
Add commit 6e826278f1 to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a8a762bc46e43bfaf4c03fc50f805fdf53f11888 Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)