amcheck: Skip unlogged relations during recovery. contrib/amcheck failed to consider the possibility that unlogged relations will not have any main relation fork files when running in hot standby mode. This led to low-level "can't happen" errors that complain about the absence of a relfilenode file.
To fix, simply skip verification of unlogged index relations during recovery. In passing, add a direct check for the presence of a main fork just before verification proper begins, so that we cleanly verify the presence of the main relation fork file. Author: Andrey Borodin, Peter Geoghegan Reported-By: Andrey Borodin Diagnosed-By: Andrey Borodin Discussion: https://postgr.es/m/[email protected] Backpatch: 10-, where amcheck was introduced. Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4f393793f7d637e4ab8e6460e7bb4cd747f01f85 Modified Files -------------- contrib/amcheck/verify_nbtree.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-)
