forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3f7b04d
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 parent430b47f commit3f7b04d
2 files changed
+5
-4
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
48 | 49 |
| |
49 | 50 |
| |
50 | 51 |
| |
| |||
382 | 383 |
| |
383 | 384 |
| |
384 | 385 |
| |
385 |
| - | |
| 386 | + | |
386 | 387 |
| |
387 | 388 |
| |
388 | 389 |
| |
| |||
403 | 404 |
| |
404 | 405 |
| |
405 | 406 |
| |
406 |
| - | |
| 407 | + | |
407 | 408 |
| |
408 | 409 |
| |
409 | 410 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1559 | 1559 |
| |
1560 | 1560 |
| |
1561 | 1561 |
| |
1562 |
| - | |
| 1562 | + | |
1563 | 1563 |
| |
1564 | 1564 |
| |
1565 | 1565 |
| |
1566 | 1566 |
| |
1567 | 1567 |
| |
1568 | 1568 |
| |
1569 |
| - | |
| 1569 | + | |
1570 | 1570 |
| |
1571 | 1571 |
| |
1572 | 1572 |
| |
|
0 commit comments
Comments
(0)