forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcaf1f67
committed
Don't set ThisTimeLineID when there's no reason to do so.
In slotfuncs.c, pg_replication_slot_advance() needs to determinethe LSN up to which the slot should be advanced, but that doesn'trequire us to update ThisTimeLineID, because none of the code calledfrom here depends on it. If the replication slot is logical,pg_logical_replication_slot_advance will call read_local_xlog_page,which does use ThisTimeLineID, but also takes care of making sureit's up to date. If the replication slot is physical, the timelineisn't used for anything at all.In logicalfuncs.c, pg_logical_slot_get_changes_guts() has the sameissue: the only code we're going to run that cares about timelinesis in or downstream of read_local_xlog_page, which already makessure that the correct value gets set. Hence, don't do it here.Patch by me, reviewed and tested by Michael Paquier, Amul Sul, andÁlvaro Herrera.Discussion:https://postgr.es/m/CA+TgmobfAAqhfWa1kaFBBFvX+5CjM=7TE=n4r4Q1o2bjbGYBpA@mail.gmail.com1 parentd74b54b commitcaf1f67
2 files changed
+3
-4
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
211 |
| - | |
212 |
| - | |
| 211 | + | |
213 | 212 |
| |
214 | 213 |
| |
215 | 214 |
| |
216 | 215 |
| |
217 |
| - | |
| 216 | + | |
218 | 217 |
| |
219 | 218 |
| |
220 | 219 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
627 | 627 |
| |
628 | 628 |
| |
629 | 629 |
| |
630 |
| - | |
| 630 | + | |
631 | 631 |
| |
632 | 632 |
| |
633 | 633 |
| |
|
0 commit comments
Comments
(0)