forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0fd38e1
committed
Don't skip SQL backends in logical decoding for visibility computation.
The logical decoding patchset introduced PROC_IN_LOGICAL_DECODING flagPGXACT flag, that allows such backends to be skipped when computingthe xmin horizon/snapshots. That's fine and sensible for walsendersstreaming out logical changes, but not at all fine for SQL backendsdoing logical decoding. If the latter set that flag any change theyhave performed outside of logical decoding will not be regarded asvisible - which e.g. can lead to that change being vacuumed away.Note that not setting the flag for SQL backends isn't particularlybothersome - the SQL backend doesn't do streaming, so it only runs fora limited amount of time.Per buildfarm member 'tick' and Alvaro.Backpatch to 9.4, where logical decoding was introduced.1 parent75ef435 commit0fd38e1
File tree
4 files changed
+19
-4
lines changed- contrib/test_decoding
- expected
- sql
- src
- backend/replication/logical
- include/storage
4 files changed
+19
-4
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
| 5 | + | |
4 | 6 |
| |
5 | 7 |
| |
6 | 8 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 |
| |
5 | 9 |
| |
6 | 10 |
| |
|
Lines changed: 12 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
149 | 155 |
| |
150 |
| - | |
151 |
| - | |
152 |
| - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
153 | 162 |
| |
154 | 163 |
| |
155 | 164 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 |
| - | |
| 46 | + | |
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
|
0 commit comments
Comments
(0)