]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Back-patch "Add parent table name in an error in reorderbuffer.c."
authorAmit Kapila <akapila@postgresql.org>
Thu, 21 Oct 2021 04:20:06 +0000 (09:50 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 21 Oct 2021 04:20:06 +0000 (09:50 +0530)
This was originally done in commit 5e77625b26 for 15 only, as a
troubleshooting aid but multiple people showed interest in back-patching
this.

Author: Jeremy Schneider
Reviewed-by: Amit Kapila
Backpatch-through: 9.6
Discussion: https://postgr.es/m/808ed65b-994c-915a-361c-577f088b837f@amazon.com

src/backend/replication/logical/reorderbuffer.c

index 984fcb29394a375150f9ae470b9dfcdf6d37b9ab..475f76fa5e0e793b2a3973826a36d82ea4535844 100644 (file)
@@ -3076,8 +3076,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);