mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 06:41:17 +02:00
ec7ffb8096
First, don't perform database access while holding a buffer lock.
When checking a heap, we can validate that TOAST pointers are sane by
performing a scan on the TOAST index and looking up the chunks that
correspond to each value ID that appears in a TOAST poiner in the main
table. But, to do that while holding a buffer lock at least risks
causing other backends to wait uninterruptibly, and probably can cause
undetected and uninterruptible deadlocks. So, instead, make a list of
checks to perform while holding the lock, and then perform the checks
after releasing it.
Second, adjust things so that we don't try to follow TOAST pointers
for tuples that are already eligible to be pruned. The TOAST tuples
become eligible for pruning at the same time that the main tuple does,
so trying to check them may lead to spurious reports of corruption,
as observed in the buildfarm. The necessary infrastructure to decide
whether or not the tuple being checked is prunable was added by
commit
|
||
---|---|---|
.. | ||
expected | ||
sql | ||
t | ||
.gitignore | ||
amcheck--1.0--1.1.sql | ||
amcheck--1.0.sql | ||
amcheck--1.1--1.2.sql | ||
amcheck--1.2--1.3.sql | ||
amcheck.control | ||
Makefile | ||
verify_heapam.c | ||
verify_nbtree.c |