On Tue, Jun 20, 2023 at 10:39 PM Andres Freund <and...@anarazel.de> wrote: > But the further we go down this path, the more important it is that we provide > some way to monitor stuff like this. IME it's not particularly practical to > rely on scanning logs to find such issues at scale. I suspect we ought to add > at least something that makes such "ignored errors" visible from stats.
I'm in favor of that, of course. We do at least use ERRCODE_INDEX_CORRUPTED for all of the ERRORs that became LOG messages in the past several years. That's a start. FWIW, I'm almost certain that I'll completely run out of ERRORs to demote to LOGs before too long. In fact, this might very well be the last ERROR that I ever have to demote to a LOG to harden nbtree VACUUM. There just aren't that many ERRORs that would benefit from similar treatment. And most of the individual cases that I've addressed come up very infrequently in practice. -- Peter Geoghegan