Skip to content

Commit 65b18ec

Browse files
committed
Trace started callback invocation
1 parent ae341ef commit 65b18ec

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy