From 34bd7699be3b9d53cb2a56f2fa5ae1fb94f4d300 Mon Sep 17 00:00:00 2001 From: Ashwin Agrawal Date: Tue, 20 Mar 2018 10:58:30 -0700 Subject: [PATCH] PANIC in debug for "local snapshot's xmin is older". To help debug the issue, PANIC incase encounter this shouldn't happen case. --- src/backend/access/transam/distributedlog.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/backend/access/transam/distributedlog.c b/src/backend/access/transam/distributedlog.c index 97946d18f0..bdd85a105f 100644 --- a/src/backend/access/transam/distributedlog.c +++ b/src/backend/access/transam/distributedlog.c @@ -216,7 +216,15 @@ DistributedLog_AdvanceOldestXmin(TransactionId oldestLocalXmin, /* sanity check, this shouldn't happen... */ if (TransactionIdFollows(oldestXmin, oldestLocalXmin)) - elog(ERROR, "local snapshot's xmin is older than recorded distributed oldestxmin"); + { +#ifdef USE_ASSERT_CHECKING + elog(PANIC, +#else + elog(ERROR, +#endif + "local snapshot's xmin (%u) is older than recorded distributed oldestxmin (%u)", + oldestLocalXmin, oldestXmin); + } currPage = -1; while (!TransactionIdEquals(oldestXmin, oldestLocalXmin)) -- GitLab