summaryrefslogtreecommitdiff
path: root/src/backend/access/heap/heapam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/heap/heapam.c')
-rw-r--r--src/backend/access/heap/heapam.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index f2f7396c006..fe3e83b4894 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8002,6 +8002,10 @@ ExtractReplicaIdentity(Relation relation, HeapTuple tp, bool key_changed, bool *
}
idx_rel = RelationIdGetRelation(replidindex);
+
+ if (!RelationIsValid(idx_rel))
+ elog(ERROR, "could not open relation with OID %u", replidindex);
+
idx_desc = RelationGetDescr(idx_rel);
/* deform tuple, so we have fast access to columns */