diff options
Diffstat (limited to 'contrib/amcheck/verify_heapam.c')
-rw-r--r-- | contrib/amcheck/verify_heapam.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c index 1dc9d89f306..ce3114f4e6c 100644 --- a/contrib/amcheck/verify_heapam.c +++ b/contrib/amcheck/verify_heapam.c @@ -624,17 +624,6 @@ verify_heapam(PG_FUNCTION_ARGS) (unsigned) nextoffnum)); } - /* - * Redirects are created by updates, so successor should be - * the result of an update. - */ - if ((next_htup->t_infomask & HEAP_UPDATED) == 0) - { - report_corruption(&ctx, - psprintf("redirected line pointer points to a non-heap-updated tuple at offset %u", - (unsigned) nextoffnum)); - } - /* HOT chains should not intersect. */ if (predecessor[nextoffnum] != InvalidOffsetNumber) { @@ -954,6 +943,15 @@ check_tuple_header(HeapCheckContext *ctx) */ } + if (HeapTupleHeaderIsHeapOnly(tuphdr) && + ((tuphdr->t_infomask & HEAP_UPDATED) == 0)) + { + report_corruption(ctx, + psprintf("tuple is heap only, but not the result of an update")); + + /* Here again, we can still perform further checks. */ + } + if (infomask & HEAP_HASNULL) expected_hoff = MAXALIGN(SizeofHeapTupleHeader + BITMAPLEN(ctx->natts)); else |