Commit 03337017 authored by Peter Eisentraut's avatar Peter Eisentraut

Set statement timestamp in apply worker

This ensures that triggers can see an up-to-date timestamp.
Reported-by: default avatarKonstantin Evteev <konst583@gmail.com>
parent 7f5cb14e
...@@ -157,12 +157,15 @@ ensure_transaction(void) ...@@ -157,12 +157,15 @@ ensure_transaction(void)
{ {
if (IsTransactionState()) if (IsTransactionState())
{ {
SetCurrentStatementStartTimestamp();
if (CurrentMemoryContext != ApplyMessageContext) if (CurrentMemoryContext != ApplyMessageContext)
MemoryContextSwitchTo(ApplyMessageContext); MemoryContextSwitchTo(ApplyMessageContext);
return false; return false;
} }
SetCurrentStatementStartTimestamp();
StartTransactionCommand(); StartTransactionCommand();
maybe_reread_subscription(); maybe_reread_subscription();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment