diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index c85fbfa41d2b78b9874dadc4ef48764b2e5c7ea6..ce6b335183150e0660ce30638013d03558c80a95 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -1701,7 +1701,15 @@ RelationDecrementReferenceCount(Relation rel) { if (rel->rd_refcnt <= 0) { + /* + * In CI intermittently ERROR is seen. To help debug the issue, just + * for debug builds elevating ERROR to PANIC. + */ +#ifdef USE_ASSERT_CHECKING + elog(PANIC, +#else elog(ERROR, +#endif "Relation decrement reference count found relation %u/%u/%u with bad count (reference count %d)", rel->rd_node.spcNode, rel->rd_node.dbNode,