mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
amcheck: Fix thinko with check of TOASTed attribute
A chunk_id type that does not match with one of the expected values (oid
or oid8) was missing a "return" clause. This caused the code to report
two corruptions instead of one.
Oversight in 6e58d6356f.
Discussion: https://postgr.es/m/aqju1K96ex28yz2X@paquier.xyz
This commit is contained in:
@@ -1884,7 +1884,7 @@ check_toasted_attribute(HeapCheckContext *ctx, ToastedAttribute *ta)
|
||||
int32 max_chunk_size;
|
||||
Oid8 toast_valueid;
|
||||
Oid toast_typid;
|
||||
vartag_external expected_tag = VARTAG_ONDISK_OID;
|
||||
vartag_external expected_tag;
|
||||
|
||||
toast_valueid = ta->va_valueid;
|
||||
extsize = VARATT_EXTINFO_GET_EXTSIZE(ta->va_extinfo);
|
||||
@@ -1904,6 +1904,7 @@ check_toasted_attribute(HeapCheckContext *ctx, ToastedAttribute *ta)
|
||||
report_toast_corruption(ctx, ta,
|
||||
psprintf("toast value " OID8_FORMAT " stored in toast table whose chunk_id has unexpected type %u",
|
||||
toast_valueid, toast_typid));
|
||||
return;
|
||||
}
|
||||
|
||||
if (ta->tag != expected_tag)
|
||||
|
||||
Reference in New Issue
Block a user