On Mon, Aug 12, 2019 at 2:58 AM Andrey Borodin <x4...@yandex-team.ru> wrote: > BTW I really want to enable rightlink-leftlink invariant validation on > standby..
That seems very hard. My hope was that bt_check_index() can detect the same problem a different way. The bt_right_page_check_scankey() cross-page check (which needs nothing more than an AccessShareLock) will often detect such problems, because the page image itself will be totally wrong in some way. I'm guessing that you have direct experience with that *not* being good enough, though. Can you share further details? I suppose that bt_right_page_check_scankey() helps with transposed pages, but doesn't help so much when you have WAL-level inconsistencies. -- Peter Geoghegan