mirror of
https://github.com/postgres/postgres.git
synced 2026-06-09 08:42:38 -04:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue