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

Commitd4bfc06

Browse files
committed
Consistently use subscription name as application name
The logical replication apply worker uses the subscription name asapplication name, except for table sync. This was incorrectly set touse the replication slot name, which might be different, in one case.Also add a comment why the other case is different.
1 parent9206ced commitd4bfc06

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,11 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
817817
MySubscription->oid,
818818
MyLogicalRepWorker->relid);
819819

820+
/*
821+
* Here we use the slot name instead of the subscription name as the
822+
* application_name, so that it is different from the main apply worker,
823+
* so that synchronous replication can distinguish them.
824+
*/
820825
wrconn=walrcv_connect(MySubscription->conninfo, true,slotname,&err);
821826
if (wrconn==NULL)
822827
ereport(ERROR,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ ApplyWorkerMain(Datum main_arg)
15951595
origin_startpos=replorigin_session_get_progress(false);
15961596
CommitTransactionCommand();
15971597

1598-
wrconn=walrcv_connect(MySubscription->conninfo, true,myslotname,
1598+
wrconn=walrcv_connect(MySubscription->conninfo, true,MySubscription->name,
15991599
&err);
16001600
if (wrconn==NULL)
16011601
ereport(ERROR,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp