mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-03 09:26:51 +02: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
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user