postgresql/src
Michael Paquier b14e9ce7d5 Extend PgStat_HashKey.objid from 4 to 8 bytes
This opens the possibility to define keys for more types of statistics
kinds in PgStat_HashKey, the first case being 8-byte query IDs for
statistics like pg_stat_statements.

This increases the size of PgStat_HashKey from 12 to 16 bytes, while
PgStatShared_HashEntry, entry stored in the dshash for pgstats, keeps
the same size due to alignment.

xl_xact_stats_item, that tracks the stats items to drop in commit WAL
records, is increased from 12 to 16 bytes.  Note that individual chunks
in commit WAL records should be multiples of sizeof(int), hence 8-byte
object IDs are stored as two uint32, based on a suggestion from Heikki
Linnakangas.

While on it, the field of PgStat_HashKey is renamed from "objoid" to
"objid", as for some stats kinds this field does not refer to OIDs but
just IDs, like for replication slot stats.

This commit bumps the following format variables:
- PGSTAT_FILE_FORMAT_ID, as PgStat_HashKey is written to the stats file
for non-serialized stats kinds in the dshash table.
- XLOG_PAGE_MAGIC for the changes in xl_xact_stats_item.
- Catalog version, for the SQL function pg_stat_have_stats().

Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/ZsvTS9EW79Up8I62@paquier.xyz
2024-09-18 12:44:15 +09:00
..
backend Extend PgStat_HashKey.objid from 4 to 8 bytes 2024-09-18 12:44:15 +09:00
bin Repair pg_upgrade for identity sequences with non-default persistence. 2024-09-17 15:53:35 -04:00
common common/jsonapi: support libpq as a client 2024-09-11 09:01:07 +02:00
fe_utils Prevent mis-encoding of "trailing junk after numeric literal" errors. 2024-09-05 12:42:33 -04:00
include Extend PgStat_HashKey.objid from 4 to 8 bytes 2024-09-18 12:44:15 +09:00
interfaces Add PQfullProtocolVersion() to surface the precise protocol version. 2024-09-09 11:54:55 -04:00
makefiles Add -Wmissing-variable-declarations to the standard compilation flags 2024-08-03 11:51:02 +02:00
pl Don't bother checking the result of SPI_connect[_ext] anymore. 2024-09-09 12:18:34 -04:00
port Only perform pg_strong_random init when required 2024-09-02 13:52:27 +02:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Extend PgStat_HashKey.objid from 4 to 8 bytes 2024-09-18 12:44:15 +09:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Introduce framework for parallelizing various pg_upgrade tasks. 2024-09-16 16:10:33 -05:00
tutorial Update copyright for 2024 2024-01-03 20:49:05 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Add -Wmissing-variable-declarations to the standard compilation flags 2024-08-03 11:51:02 +02:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00