mirror of
https://github.com/postgres/postgres.git
synced 2026-07-16 13:12:58 -04:00
concurrent repack: check there are no leftover toast attribs
Upon reading attributes from the file of concurrent changes, verify that none are left over unprocessed after we read all columns for the tuple. This should never happen, so add an elog(ERROR) for it. While at it, downgrade a nearby message from ereport() to elog(). These things should never happen. Author: Aleksander Alekseev <aleksander@tigerdata.com> Discussion: https://postgr.es/m/CAJ7c6TMSF7cANU8nEJ9E28EvU74tE4H7AzT292Rt3ZuHqqxq8w@mail.gmail.com
This commit is contained in:
parent
ae39bd23c6
commit
e2a8cabc47
1 changed files with 6 additions and 3 deletions
|
|
@ -2806,10 +2806,13 @@ restore_tuple(BufFile *file, Relation relation, TupleTableSlot *slot)
|
|||
slot->tts_values[i] = PointerGetDatum(value);
|
||||
natt_ext--;
|
||||
if (natt_ext < 0)
|
||||
ereport(ERROR,
|
||||
errcode(ERRCODE_DATA_CORRUPTED),
|
||||
errmsg("insufficient number of attributes stored separately"));
|
||||
elog(ERROR, "insufficient number of attributes stored separately");
|
||||
}
|
||||
|
||||
if (natt_ext != 0)
|
||||
elog(ERROR,
|
||||
"unexpected number of attributes stored separately (%d remaining)",
|
||||
natt_ext);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue