Add parent table name in an error in reorderbuffer.c.

This can help in troubleshooting the cause of a particular error that can
occur during decoding.

Author: Jeremy Schneider
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/808ed65b-994c-915a-361c-577f088b837f@amazon.com
This commit is contained in:
Amit Kapila 2021-09-22 07:42:52 +05:30
parent dd94c2852e
commit 5e77625b26
1 changed files with 2 additions and 2 deletions

View File

@ -4633,8 +4633,8 @@ ReorderBufferToastReplace(ReorderBuffer *rb, ReorderBufferTXN *txn,
toast_rel = RelationIdGetRelation(relation->rd_rel->reltoastrelid);
if (!RelationIsValid(toast_rel))
elog(ERROR, "could not open relation with OID %u",
relation->rd_rel->reltoastrelid);
elog(ERROR, "could not open toast relation with OID %u (base relation \"%s\")",
relation->rd_rel->reltoastrelid, RelationGetRelationName(relation));
toast_desc = RelationGetDescr(toast_rel);