forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit24ff700
committed
Code review for commit05a7be9.
Avoid having walreceiver code know explicitly about the precisionand underlying datatype of TimestampTz. (There is still onecalculation that knows that, which should be replaced with use ofTimestampDifferenceMilliseconds; but we need to figure out what to doabout overflow cases first.)In support of this, provide a TimestampTzPlusSeconds macro, as wellas TIMESTAMP_INFINITY and TIMESTAMP_MINUS_INFINITY macros. (We couldhave used the existing DT_NOEND and DT_NOBEGIN symbols, but I judgedthose too opaque and confusing.)Move GetCurrentTimestamp calls so that it's more obvious that weare not using stale values of "now" anyplace. This doesn't resultin net more calls, and might indeed make for net fewer.Avoid having a dummy value in the WalRcvWakeupReason enum, so thatwe can hope for the compiler to catch overlooked switch cases.Nathan Bossart and Tom LaneDiscussion:https://postgr.es/m/20230125235004.GA1327755@nathanxps131 parente35bb9f commit24ff700
File tree
3 files changed
+36
-26
lines changed- src
- backend/replication
- include
- datatype
- utils
3 files changed
+36
-26
lines changedLines changed: 24 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 |
| - | |
126 |
| - | |
| 125 | + | |
| 126 | + | |
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
| |||
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
209 |
| - | |
210 |
| - | |
211 | 209 |
| |
212 | 210 |
| |
213 | 211 |
| |
| |||
261 | 259 |
| |
262 | 260 |
| |
263 | 261 |
| |
| 262 | + | |
264 | 263 |
| |
265 | 264 |
| |
266 | 265 |
| |
| |||
464 | 463 |
| |
465 | 464 |
| |
466 | 465 |
| |
| 466 | + | |
467 | 467 |
| |
468 | 468 |
| |
469 | 469 |
| |
| |||
472 | 472 |
| |
473 | 473 |
| |
474 | 474 |
| |
475 |
| - | |
476 | 475 |
| |
477 | 476 |
| |
478 | 477 |
| |
| |||
487 | 486 |
| |
488 | 487 |
| |
489 | 488 |
| |
| 489 | + | |
490 | 490 |
| |
491 | 491 |
| |
492 | 492 |
| |
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
509 |
| - | |
510 | 509 |
| |
511 | 510 |
| |
512 | 511 |
| |
| |||
525 | 524 |
| |
526 | 525 |
| |
527 | 526 |
| |
528 |
| - | |
| 527 | + | |
529 | 528 |
| |
530 | 529 |
| |
531 | 530 |
| |
| |||
536 | 535 |
| |
537 | 536 |
| |
538 | 537 |
| |
| 538 | + | |
539 | 539 |
| |
540 | 540 |
| |
541 | 541 |
| |
| |||
556 | 556 |
| |
557 | 557 |
| |
558 | 558 |
| |
559 |
| - | |
560 | 559 |
| |
561 | 560 |
| |
562 | 561 |
| |
| |||
592 | 591 |
| |
593 | 592 |
| |
594 | 593 |
| |
| 594 | + | |
595 | 595 |
| |
596 | 596 |
| |
597 | 597 |
| |
598 | 598 |
| |
599 | 599 |
| |
600 | 600 |
| |
601 |
| - | |
602 |
| - | |
| 601 | + | |
| 602 | + | |
603 | 603 |
| |
604 | 604 |
| |
605 | 605 |
| |
606 | 606 |
| |
607 |
| - | |
| 607 | + | |
608 | 608 |
| |
609 | 609 |
| |
610 | 610 |
| |
| |||
1266 | 1266 |
| |
1267 | 1267 |
| |
1268 | 1268 |
| |
1269 |
| - | |
1270 | 1269 |
| |
1271 | 1270 |
| |
1272 | 1271 |
| |
| |||
1310 | 1309 |
| |
1311 | 1310 |
| |
1312 | 1311 |
| |
1313 |
| - | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1314 | 1316 |
| |
1315 | 1317 |
| |
1316 | 1318 |
| |
| |||
1319 | 1321 |
| |
1320 | 1322 |
| |
1321 | 1323 |
| |
1322 |
| - | |
| 1324 | + | |
1323 | 1325 |
| |
1324 |
| - | |
| 1326 | + | |
1325 | 1327 |
| |
1326 | 1328 |
| |
1327 | 1329 |
| |
1328 |
| - | |
| 1330 | + | |
1329 | 1331 |
| |
1330 |
| - | |
| 1332 | + | |
1331 | 1333 |
| |
1332 | 1334 |
| |
1333 | 1335 |
| |
1334 |
| - | |
| 1336 | + | |
1335 | 1337 |
| |
1336 |
| - | |
| 1338 | + | |
1337 | 1339 |
| |
1338 | 1340 |
| |
1339 | 1341 |
| |
1340 |
| - | |
| 1342 | + | |
1341 | 1343 |
| |
1342 |
| - | |
1343 |
| - | |
1344 |
| - | |
| 1344 | + | |
1345 | 1345 |
| |
| 1346 | + | |
1346 | 1347 |
| |
1347 | 1348 |
| |
1348 | 1349 |
| |
|
Lines changed: 10 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
146 |
| - | |
| 146 | + | |
| 147 | + | |
147 | 148 |
| |
148 |
| - | |
149 |
| - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
150 | 157 |
| |
151 | 158 |
| |
152 | 159 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
81 | 81 |
| |
82 | 82 |
| |
83 | 83 |
| |
| 84 | + | |
84 | 85 |
| |
| 86 | + | |
85 | 87 |
| |
86 | 88 |
| |
87 | 89 |
| |
|
0 commit comments
Comments
(0)