diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 7c1771eae7..7b4d4b75f1 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -750,6 +750,13 @@ GetCurrentTransactionStopTimestamp(void) void SetCurrentStatementStartTimestamp(void) { + /* + * Skip if on a walsender; this is not needed, and it confuses monitoring + * if we publish non-NULL values. + */ + if (am_walsender) + return; + if (!IsParallelWorker()) stmtStartTimestamp = GetCurrentTimestamp(); else