forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0f5ca02
committed
Implement waiting for given lsn at transaction start
This commit adds following optional clause to BEGIN and START TRANSACTIONcommands. WAIT FOR LSN lsn [ TIMEOUT timeout ]New clause pospones transaction start till given lsn is applied on standby.This clause allows user be sure, that changes previously made on primary wouldbe visible on standby.New shared memory struct is used to track awaited lsn per backend. Recoveryprocess wakes up backend once required lsn is applied.Author: Ivan Kartyshov, Anna AkentevaReviewed-by: Craig Ringer, Thomas Munro, Robert Haas, Kyotaro HoriguchiReviewed-by: Masahiko Sawada, Ants Aasma, Dmitry Ivanov, Simon RiggsReviewed-by: Amit Kapila, Alexander KorotkovDiscussion:https://postgr.es/m/0240c26c-9f84-30ea-fca9-93ab2df5f305%40postgrespro.ru1 parent357889e commit0f5ca02
File tree
20 files changed
+585
-10
lines changed- doc/src/sgml/ref
- src
- backend
- access/transam
- commands
- nodes
- parser
- storage
- ipc
- lmgr
- tcop
- utils/adt
- include
- commands
- nodes
- parser
- utils
- test/recovery/t
- tools/pgindent
20 files changed
+585
-10
lines changedLines changed: 16 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
| 24 | + | |
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
66 | 77 |
| |
67 | 78 |
| |
68 | 79 |
| |
| |||
146 | 157 |
| |
147 | 158 |
| |
148 | 159 |
| |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
149 | 164 |
| |
150 | 165 |
| |
151 | 166 |
| |
|
Lines changed: 16 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
| 24 | + | |
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
43 | 54 |
| |
44 | 55 |
| |
45 | 56 |
| |
| |||
78 | 89 |
| |
79 | 90 |
| |
80 | 91 |
| |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
81 | 96 |
| |
82 | 97 |
| |
83 | 98 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
| 45 | + | |
45 | 46 |
| |
46 | 47 |
| |
47 | 48 |
| |
| |||
7154 | 7155 |
| |
7155 | 7156 |
| |
7156 | 7157 |
| |
| 7158 | + | |
7157 | 7159 |
| |
7158 | 7160 |
| |
7159 | 7161 |
| |
| |||
7357 | 7359 |
| |
7358 | 7360 |
| |
7359 | 7361 |
| |
| 7362 | + | |
| 7363 | + | |
| 7364 | + | |
| 7365 | + | |
| 7366 | + | |
| 7367 | + | |
| 7368 | + | |
| 7369 | + | |
| 7370 | + | |
| 7371 | + | |
| 7372 | + | |
7360 | 7373 |
| |
7361 | 7374 |
| |
7362 | 7375 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
| 60 | + | |
| 61 | + | |
61 | 62 |
| |
62 | 63 |
|
0 commit comments
Comments
(0)