forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit38b38fb
committed
pg_stat_replication.sync_state was displayed incorrectly at page boundary.
XLogRecPtrIsInvalid() only checks the xrecoff field, which is correct whenchecking if a WAL record could legally begin at the given position, but WALsending can legally be paused at a page boundary, in which case xrecoff is0. Use XLByteEQ(..., InvalidXLogRecPtr) instead, which checks that bothxlogid and xrecoff are 0.9.3 doesn't have this problem because XLogRecPtr is now a single 64-bitinteger, so XLogRecPtrIsInvalid() does the right thing. Apply to 9.2, and9.1 where pg_stat_replication view was introduced.Kyotaro HORIGUCHI, reviewed by Fujii Masao.1 parent806e6d1 commit38b38fb
2 files changed
+6
-4
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
375 | 375 |
| |
376 | 376 |
| |
377 | 377 |
| |
| 378 | + | |
378 | 379 |
| |
379 | 380 |
| |
380 | 381 |
| |
| |||
384 | 385 |
| |
385 | 386 |
| |
386 | 387 |
| |
387 |
| - | |
| 388 | + | |
388 | 389 |
| |
389 | 390 |
| |
390 | 391 |
| |
| |||
405 | 406 |
| |
406 | 407 |
| |
407 | 408 |
| |
408 |
| - | |
| 409 | + | |
409 | 410 |
| |
410 | 411 |
| |
411 | 412 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1403 | 1403 |
| |
1404 | 1404 |
| |
1405 | 1405 |
| |
| 1406 | + | |
1406 | 1407 |
| |
1407 | 1408 |
| |
1408 | 1409 |
| |
| |||
1448 | 1449 |
| |
1449 | 1450 |
| |
1450 | 1451 |
| |
1451 |
| - | |
| 1452 | + | |
1452 | 1453 |
| |
1453 | 1454 |
| |
1454 | 1455 |
| |
1455 | 1456 |
| |
1456 | 1457 |
| |
1457 | 1458 |
| |
1458 |
| - | |
| 1459 | + | |
1459 | 1460 |
| |
1460 | 1461 |
| |
1461 | 1462 |
| |
|
0 commit comments
Comments
(0)