Set statement timestamp in apply worker
This ensures that triggers can see an up-to-date timestamp. Reported-by: Konstantin Evteev <konst583@gmail.com>
This commit is contained in:
parent
7f5cb14e3c
commit
033370179a
|
@ -157,12 +157,15 @@ ensure_transaction(void)
|
|||
{
|
||||
if (IsTransactionState())
|
||||
{
|
||||
SetCurrentStatementStartTimestamp();
|
||||
|
||||
if (CurrentMemoryContext != ApplyMessageContext)
|
||||
MemoryContextSwitchTo(ApplyMessageContext);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
SetCurrentStatementStartTimestamp();
|
||||
StartTransactionCommand();
|
||||
|
||||
maybe_reread_subscription();
|
||||
|
|
Loading…
Reference in New Issue