Add error codes to some corruption log messages

In some cases we have elog(ERROR) while corruption is certain and we
can give a clear error code ERRCODE_DATA_CORRUPTED or
ERRCODE_INDEX_CORRUPTED.

Author: Andrey Borodin <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/flat/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fd6ec93bf890314ac694dc8a7f3c45702ecc1bbd

Modified Files
--------------
src/backend/access/heap/heapam_handler.c |  4 ++-
src/backend/access/heap/tuptoaster.c     | 58 +++++++++++++++++++-------------
src/backend/access/nbtree/nbtinsert.c    | 16 +++++----
src/backend/access/nbtree/nbtpage.c      | 30 +++++++++++------
src/backend/access/nbtree/nbtsearch.c    |  6 ++--
5 files changed, 70 insertions(+), 44 deletions(-)

Reply via email to