mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03: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:
@ -157,12 +157,15 @@ ensure_transaction(void)
|
||||
{
|
||||
if (IsTransactionState())
|
||||
{
|
||||
SetCurrentStatementStartTimestamp();
|
||||
|
||||
if (CurrentMemoryContext != ApplyMessageContext)
|
||||
MemoryContextSwitchTo(ApplyMessageContext);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
SetCurrentStatementStartTimestamp();
|
||||
StartTransactionCommand();
|
||||
|
||||
maybe_reread_subscription();
|
||||
|
Reference in New Issue
Block a user