aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/replication/logical/logical.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c
index 64b8280c135..aae0ae5b8aa 100644
--- a/src/backend/replication/logical/logical.c
+++ b/src/backend/replication/logical/logical.c
@@ -1565,6 +1565,7 @@ LogicalIncreaseXminForSlot(XLogRecPtr current_lsn, TransactionId xmin)
{
bool updated_xmin = false;
ReplicationSlot *slot;
+ bool got_new_xmin = false;
slot = MyReplicationSlot;
@@ -1602,9 +1603,19 @@ LogicalIncreaseXminForSlot(XLogRecPtr current_lsn, TransactionId xmin)
{
slot->candidate_catalog_xmin = xmin;
slot->candidate_xmin_lsn = current_lsn;
+
+ /*
+ * Log new xmin at an appropriate log level after releasing the
+ * spinlock.
+ */
+ got_new_xmin = true;
}
SpinLockRelease(&slot->mutex);
+ if (got_new_xmin)
+ elog(DEBUG1, "got new catalog xmin %u at %X/%X", xmin,
+ LSN_FORMAT_ARGS(current_lsn));
+
/* candidate already valid with the current flush position, apply */
if (updated_xmin)
LogicalConfirmReceivedLocation(slot->data.confirmed_flush);