diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 9b252213d95..0dd6b82f99a 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -758,6 +758,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