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

Commit65b18ec

Browse files
committed
Trace started callback invocation
1 parentae341ef commit65b18ec

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎contrib/mmts/multimaster.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3082,6 +3082,7 @@ MtmReplicationStartedHook(struct PGLogicalStartedHookArgs* args)
30823082
{
30833083
MtmLock(LW_EXCLUSIVE);
30843084
MtmSenderStarted=1;
3085+
elog(LOG,"Start %d senders and %d receivers from %d cluster status %s",Mtm->nSenders+1,Mtm->nReceivers,Mtm->nLiveNodes-1,MtmNodeStatusMnem[Mtm->status]);
30853086
if (++Mtm->nSenders==Mtm->nLiveNodes-1&&Mtm->nReceivers==Mtm->nLiveNodes-1&&Mtm->status==MTM_CONNECTED) {
30863087
MtmSwitchClusterMode(MTM_ONLINE);
30873088
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,10 @@ DecodingContextFindStartpoint(LogicalDecodingContext *ctx)
451451
ctx->slot->data.confirmed_flush=ctx->reader->EndRecPtr;
452452

453453
old_context=MemoryContextSwitchTo(ctx->context);
454-
if (ctx->callbacks.started_cb!=NULL)
454+
if (ctx->callbacks.started_cb!=NULL) {
455+
elog(LOG,"Call started callback");
455456
started_cb_wrapper(ctx);
457+
}
456458
MemoryContextSwitchTo(old_context);
457459
}
458460

@@ -577,7 +579,7 @@ started_cb_wrapper(LogicalDecodingContext *ctx)
577579

578580
/* Push callback + info on the error context stack */
579581
state.ctx=ctx;
580-
state.callback_name="startup";
582+
state.callback_name="started";
581583
state.report_location=InvalidXLogRecPtr;
582584
errcallback.callback=output_plugin_error_callback;
583585
errcallback.arg= (void*)&state;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp