Re: Logging corruption error codes

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, pgsql-bugs@lists.postgresql.org, Анна Крханбарова <annkpx@yandex-team.ru>, Dmitriy Sarafannikov <dsarafan@yandex-team.ru>
Date: 2019-06-26T01:59:57Z
Lists: pgsql-bugs
On Tue, Jun 25, 2019 at 03:01:23PM +0500, Andrey Borodin wrote:
> Ok, if it's not a bug, should I re-send it to pgsql-hackers@ ? Or
> just register on CF as a new thing...

If you wish to discard this patch and begin a more advanced discussion
about those errors, a new discussion on -hackers would be adapted.

Now, based on what I see you are suggesting for the couple of code
paths related to indexes, I don't see any problem in just applying
what you have (I'd need a second-look at it obviously), in which case
this thread is fine IMO.  I don't think that this should be
back-patched though as this is no bug fix, as mentioned upthread.

>> Note: the indentation of the patch is incorrect everywhere.  A
>> committer applying your patch would apply pgindent anyway.  :)
>
> Oh, sorry. I'm trying to write "like a code around", but do not
> understand clearly how pgindent formats...

No problem.  Trying to make the code consistent with the surroundings
is a good habit.
--
Michael

Commits

  1. Add error codes to some corruption log messages