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

Amit Kapila
Allow synced slots to have their inactive_since.
This commit does two things:1) Maintains inactive_since for sync slots whenever the slot is releasedjust like any other regular slot.2) Ensures the value is set to the current timestamp during the promotionof standby to help correctly interpret the time after promotion. We don'twant the slots to appear inactive for a long time after promotion if theyhaven't been synchronized recently. This would also avoid the invalidationof such slots immediately after promotion if tomorrow we have a featurethat invalidates slots based on their inactivity time. Whoever acquiresthe slot i.e. makes the slot active will reset it to NULL.Author: Bharath RupireddyReviewed-by: Bertrand Drouvot, Amit Kapila, Shveta Malik, Masahiko SawadaDiscussion:https://postgr.es/m/CAA4eK1KrPGwfZV9LYGidjxHeW+rxJ=E2ThjXvwRGLO=iLNuo=Q@mail.gmail.comDiscussion:https://postgr.es/m/CALj2ACW4aUe-_uFQOjdWCEN-xXoLGhmvRFnL8SNw_TZ5nJe+aw@mail.gmail.comDiscussion:https://postgr.es/m/CA+Tgmob_Ta-t2ty8QrKHBGnNLrf4ZYcwhGHGFsuUoFrAEDw4sA@mail.gmail.com1 parentf98dbde commit6f132ed
File tree
6 files changed
+160
-39
lines changed- doc/src/sgml
- src
- backend/replication
- logical
- test
- perl/PostgreSQL/Test
- recovery/t
6 files changed
+160
-39
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2530 | 2530 |
| |
2531 | 2531 |
| |
2532 | 2532 |
| |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
2533 | 2540 |
| |
2534 | 2541 |
| |
2535 | 2542 |
| |
|
Lines changed: 57 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
| 153 | + | |
153 | 154 |
| |
154 | 155 |
| |
155 | 156 |
| |
| |||
584 | 585 |
| |
585 | 586 |
| |
586 | 587 |
| |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
587 | 593 |
| |
588 | 594 |
| |
589 | 595 |
| |
| |||
1355 | 1361 |
| |
1356 | 1362 |
| |
1357 | 1363 |
| |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1358 | 1412 |
| |
1359 | 1413 |
| |
1360 | 1414 |
| |
| |||
1368 | 1422 |
| |
1369 | 1423 |
| |
1370 | 1424 |
| |
| 1425 | + | |
1371 | 1426 |
| |
1372 | 1427 |
| |
1373 | 1428 |
| |
| |||
1400 | 1455 |
| |
1401 | 1456 |
| |
1402 | 1457 |
| |
| 1458 | + | |
| 1459 | + | |
1403 | 1460 |
| |
1404 | 1461 |
| |
1405 | 1462 |
| |
|
Lines changed: 7 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
690 | 690 |
| |
691 | 691 |
| |
692 | 692 |
| |
693 |
| - | |
694 |
| - | |
695 |
| - | |
696 |
| - | |
| 693 | + | |
| 694 | + | |
697 | 695 |
| |
698 |
| - | |
699 |
| - | |
| 696 | + | |
700 | 697 |
| |
701 | 698 |
| |
702 | 699 |
| |
| |||
2369 | 2366 |
| |
2370 | 2367 |
| |
2371 | 2368 |
| |
2372 |
| - | |
2373 |
| - | |
2374 |
| - | |
2375 |
| - | |
2376 |
| - | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
2377 | 2372 |
| |
2378 |
| - | |
2379 |
| - | |
2380 |
| - | |
2381 |
| - | |
| 2373 | + | |
2382 | 2374 |
| |
2383 | 2375 |
| |
2384 | 2376 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3276 | 3276 |
| |
3277 | 3277 |
| |
3278 | 3278 |
| |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
3279 | 3310 |
| |
3280 | 3311 |
| |
3281 | 3312 |
| |
|
Lines changed: 2 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
443 | 443 |
| |
444 | 444 |
| |
445 | 445 |
| |
446 |
| - | |
| 446 | + | |
447 | 447 |
| |
448 | 448 |
| |
449 | 449 |
| |
| |||
502 | 502 |
| |
503 | 503 |
| |
504 | 504 |
| |
505 |
| - | |
| 505 | + | |
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
| |||
540 | 540 |
| |
541 | 541 |
| |
542 | 542 |
| |
543 |
| - | |
544 |
| - | |
545 |
| - | |
546 |
| - | |
547 |
| - | |
548 |
| - | |
549 |
| - | |
550 |
| - | |
551 |
| - | |
552 |
| - | |
553 |
| - | |
554 |
| - | |
555 |
| - | |
556 |
| - | |
557 |
| - | |
558 |
| - | |
559 |
| - | |
560 |
| - | |
561 |
| - | |
562 |
| - | |
563 |
| - | |
564 |
| - | |
565 | 543 |
|
Lines changed: 56 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 |
| |
39 | 46 |
| |
40 | 47 |
| |
| |||
174 | 181 |
| |
175 | 182 |
| |
176 | 183 |
| |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
177 | 189 |
| |
178 | 190 |
| |
179 | 191 |
| |
| |||
190 | 202 |
| |
191 | 203 |
| |
192 | 204 |
| |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
193 | 217 |
| |
194 | 218 |
| |
195 | 219 |
| |
| |||
237 | 261 |
| |
238 | 262 |
| |
239 | 263 |
| |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
240 | 271 |
| |
241 | 272 |
| |
242 | 273 |
| |
| |||
257 | 288 |
| |
258 | 289 |
| |
259 | 290 |
| |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
260 | 296 |
| |
261 | 297 |
| |
262 | 298 |
| |
| |||
808 | 844 |
| |
809 | 845 |
| |
810 | 846 |
| |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
811 | 853 |
| |
812 | 854 |
| |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
813 | 869 |
| |
814 | 870 |
| |
815 | 871 |
| |
|
0 commit comments
Comments
(0)