forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0ec3c29

Amit Kapila
Avoid updating inactive_since for invalid replication slots.
It is possible for the inactive_since value of an invalid replication slotto be updated multiple times, which is unexpected behavior like during therelease of the slot or at the time of restart. This is harmless becauseinvalid slots are not allowed to be accessed but it is not prudent toupdate invalid slots. We are planning to invalidate slots due to otherreasons like idle time and it will look odd that the slot's inactive_sincedisplays the recent time in this field after invalidated due to idle time.So, this patch ensures that the inactive_since field of slots is notupdated for invalid slots.In the passing, ensure to use the same inactive_since time for all theslots at restart while restoring them from the disk.Author: Nisha Moond <nisha.moond412@gmail.com>Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>Reviewed-by: Vignesh C <vignesh21@gmail.com>Reviewed-by: Peter Smith <smithpb2250@gmail.com>Reviewed-by: Hou Zhijie <houzj.fnst@fujitsu.com>Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Discussion:https://postgr.es/m/CABdArM7QdifQ_MHmMA=Cc4v8+MeckkwKncm2Nn6tX9wSCQ-+iw@mail.gmail.com1 parentb2bdb97 commit0ec3c29
File tree
4 files changed
+30
-15
lines changed- doc/src/sgml
- src
- backend/replication
- logical
- include/replication
4 files changed
+30
-15
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2566 | 2566 |
| |
2567 | 2567 |
| |
2568 | 2568 |
| |
2569 |
| - | |
| 2569 | + | |
| 2570 | + | |
2570 | 2571 |
| |
2571 | 2572 |
| |
2572 | 2573 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1541 | 1541 |
| |
1542 | 1542 |
| |
1543 | 1543 |
| |
1544 |
| - | |
1545 |
| - | |
1546 |
| - | |
| 1544 | + | |
1547 | 1545 |
| |
1548 | 1546 |
| |
1549 | 1547 |
| |
|
Lines changed: 10 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
644 | 644 |
| |
645 | 645 |
| |
646 | 646 |
| |
647 |
| - | |
648 |
| - | |
649 |
| - | |
| 647 | + | |
650 | 648 |
| |
651 | 649 |
| |
652 | 650 |
| |
| |||
720 | 718 |
| |
721 | 719 |
| |
722 | 720 |
| |
723 |
| - | |
| 721 | + | |
724 | 722 |
| |
725 | 723 |
| |
726 | 724 |
| |
727 | 725 |
| |
728 |
| - | |
729 |
| - | |
730 |
| - | |
731 |
| - | |
732 |
| - | |
| 726 | + | |
733 | 727 |
| |
734 | 728 |
| |
735 | 729 |
| |
| |||
2218 | 2212 |
| |
2219 | 2213 |
| |
2220 | 2214 |
| |
| 2215 | + | |
2221 | 2216 |
| |
2222 | 2217 |
| |
2223 | 2218 |
| |
| |||
2408 | 2403 |
| |
2409 | 2404 |
| |
2410 | 2405 |
| |
2411 |
| - | |
| 2406 | + | |
| 2407 | + | |
2412 | 2408 |
| |
2413 |
| - | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
2414 | 2413 |
| |
2415 | 2414 |
| |
2416 | 2415 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
228 | 228 |
| |
229 | 229 |
| |
230 | 230 |
| |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
231 | 248 |
| |
232 | 249 |
| |
233 | 250 |
| |
|
0 commit comments
Comments
(0)