From 8fa9add60b3a0d3d9212263e89280eb5d5465502 Mon Sep 17 00:00:00 2001 From: openGaussDev Date: Thu, 10 Mar 2022 16:17:53 +0800 Subject: [PATCH] logical decoding fix oldestXmin bug Offering: openGaussDev More detail: logical decoding fix oldestXmin bug Match-id-87cb95184273b561cc007bc585ff4e45fc03c45a --- src/gausskernel/storage/ipc/procarray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gausskernel/storage/ipc/procarray.cpp b/src/gausskernel/storage/ipc/procarray.cpp index 59b4fbb7b..1da108c3d 100755 --- a/src/gausskernel/storage/ipc/procarray.cpp +++ b/src/gausskernel/storage/ipc/procarray.cpp @@ -1567,7 +1567,7 @@ TransactionId GetOldestXmin(Relation rel, bool bFixRecentGlobalXmin, bool bRecen * possible. We need to do so if we're computing the global limit (rel = * NULL) or if the passed relation is a catalog relation of some kind. */ - if ((rel == NULL || RelationIsAccessibleInLogicalDecoding(rel)) && + if ((rel != NULL && RelationIsAccessibleInLogicalDecoding(rel)) && TransactionIdIsValid(replication_slot_catalog_xmin) && NormalTransactionIdPrecedes(replication_slot_catalog_xmin, result)) result = replication_slot_catalog_xmin;