pgsql: Add error codes when vacuum discovers VM corruption

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add error codes when vacuum discovers VM corruption
Date: 2025-09-08 21:15:56
Message-ID: E1uvjDQ-001Afa-16@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add error codes when vacuum discovers VM corruption

Commit fd6ec93bf890314a and other previous work established the
principle that when an error is potentially reachable in case of on-disk
corruption but is not expected to be reached otherwise,
ERRCODE_DATA_CORRUPTED should be used. This allows log monitoring
software to search for evidence of corruption by filtering on the error
code.

Enhance the existing log messages emitted when the heap page is found to
be inconsistent with the VM by adding this error code.

Suggested-by: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Author: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Reviewed-by: Robert Haas <robertmhaas(at)gmail(dot)com>
Discussion: https://postgr.es/m/87DD95AA-274F-4F4F-BAD9-7738E5B1F905%40yandex-team.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8ec97e78a7713a1ebf4976b55c19f6c9bc2716d9

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2025-09-09 03:28:52 pgsql: Fix Coverity issue reported in commit a850be2fe.
Previous Message Jeff Davis 2025-09-08 19:31:02 pgsql: meson: build checksums with extra optimization flags.