Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c34788

Browse files
author
Amit Kapila
committed
Log new catalog xmin candidate in LogicalIncreaseXminForSlot().
Similar to LogicalIncreaseRestartDecodingForSlot() add a debug message toLogicalIncreaseXminForSlot() reporting a new catalog_xmin candidate.This just adds additional diagnostic information during logical decoding thatcan aid debugging.Author: Ashutosh BapatReviewed-by: Masahiko Sawada, Amit KapilaDiscussion:https://postgr.es/m/CAExHW5usQWbiUz0hHOCu5twS1O9DvpcPojf6sor=8q--VUuMbA@mail.gmail.com
1 parentbd5846e commit4c34788

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎src/backend/replication/logical/logical.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,7 @@ LogicalIncreaseXminForSlot(XLogRecPtr current_lsn, TransactionId xmin)
15651565
{
15661566
boolupdated_xmin= false;
15671567
ReplicationSlot*slot;
1568+
boolgot_new_xmin= false;
15681569

15691570
slot=MyReplicationSlot;
15701571

@@ -1602,9 +1603,19 @@ LogicalIncreaseXminForSlot(XLogRecPtr current_lsn, TransactionId xmin)
16021603
{
16031604
slot->candidate_catalog_xmin=xmin;
16041605
slot->candidate_xmin_lsn=current_lsn;
1606+
1607+
/*
1608+
* Log new xmin at an appropriate log level after releasing the
1609+
* spinlock.
1610+
*/
1611+
got_new_xmin= true;
16051612
}
16061613
SpinLockRelease(&slot->mutex);
16071614

1615+
if (got_new_xmin)
1616+
elog(DEBUG1,"got new catalog xmin %u at %X/%X",xmin,
1617+
LSN_FORMAT_ARGS(current_lsn));
1618+
16081619
/* candidate already valid with the current flush position, apply */
16091620
if (updated_xmin)
16101621
LogicalConfirmReceivedLocation(slot->data.confirmed_flush);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp