projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f5cb14
)
Set statement timestamp in apply worker
author
Peter Eisentraut
Sat, 17 Jun 2017 12:54:21 +0000
(08:54 -0400)
committer
Peter Eisentraut
Sat, 17 Jun 2017 12:54:21 +0000
(08:54 -0400)
This ensures that triggers can see an up-to-date timestamp.
Reported-by: Konstantin Evteev
src/backend/replication/logical/worker.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/replication/logical/worker.c
b/src/backend/replication/logical/worker.c
index 97d2dff0dd34b5c2ce44003e4eaeb6cb2b92a99c..21a4fea821dcd07bea913614b7f4b0f0791a3dc2 100644
(file)
--- a/
src/backend/replication/logical/worker.c
+++ b/
src/backend/replication/logical/worker.c
@@
-157,12
+157,15
@@
ensure_transaction(void)
{
if (IsTransactionState())
{
+ SetCurrentStatementStartTimestamp();
+
if (CurrentMemoryContext != ApplyMessageContext)
MemoryContextSwitchTo(ApplyMessageContext);
return false;
}
+ SetCurrentStatementStartTimestamp();
StartTransactionCommand();
maybe_reread_subscription();