diff options
| author | Michael Paquier | 2026-09-17 10:25:30 +0000 |
|---|---|---|
| committer | Michael Paquier | 2026-09-17 10:25:30 +0000 |
| commit | 203b96953e755c72d710ee3fb1b733729bd9a4d2 (patch) | |
| tree | 29733b12cc06599009a187417a5459f90a3d80ff /doc | |
| parent | e371cb7b89dddd9c1d3d89f1e5c64dabc05474aa (diff) | |
Tolerate partial pgstats entries in pgstat_gc_entry_refs()REL_16_STABLE
pgstat_get_entry_ref_cached() inserts a local entry_ref with
shmem-related fields set to NULL, expecting pgstat_get_entry_ref() (its
sole caller) to fill them up before returning. If an ERROR happens
while pgstat_get_entry_ref() runs, it could be possible to finish with a
local pgstats entry partially filled.
This could lead to a crash of pgstat_gc_entry_refs(), which tolerates a
NULL shared_stats in an assertion but unconditionally dereferenced its
"dropped" and "generation" fields.
This extends 4069df21beb8, being a cheap insurance against NULL pointer
dereference, if some code paths of pgstat_get_entry_ref() are not able
to perform any cleanup actions (for example after a dsm_create()
throwing an ERROR).
Reviewed-by: Grigorev Jurij <ju.grigorev@ftdata.ru>
Discussion: https://postgr.es/m/aqtiKTvl519bu8-V@paquier.xyz
Backpatch-through: 15
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions
