- Notifications
You must be signed in to change notification settings - Fork5
Commit0cb91cc
committed
Remove the logId/logSeg fields from pg_control, because they are not needed
in normal operation, and we can avoid rewriting pg_control at every logsegment switch if we don't insist that these values be valid. Reducingthe number of pg_control updates is a good idea for both performance andreliability. It does make pg_resetxlog's life a bit harder, but that seemsa good tradeoff; and anyway the change to pg_resetxlog amounts to automatingsomething people formerly needed to do by hand, namely look at the existingpg_xlog files to make sure the new WAL start point was past them.In passing, change the wording of xlog.c's "database system was interrupted"messages: describe the pg_control timestamp as "last known up at" rather thanimplying it is the exact time of service interruption. With this change thetimestamp will generally be the time of the last checkpoint, which could bemany minutes before the failure; and we've already seen indications thatpeople tend to misinterpret the old wording.initdb forced due to change in pg_control layout. Simon Riggs and Tom Lane1 parent98cacd1 commit0cb91cc
File tree
5 files changed
+172
-99
lines changed- doc/src/sgml/ref
- src
- backend/access/transam
- bin
- pg_controldata
- pg_resetxlog
- include/catalog
5 files changed
+172
-99
lines changedLines changed: 15 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
75 |
| - | |
| 75 | + | |
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 |
| - | |
| 130 | + | |
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
| |||
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
142 | 154 |
| |
143 | 155 |
| |
144 | 156 |
| |
|
Lines changed: 42 additions & 58 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
1538 | 1538 |
| |
1539 | 1539 |
| |
1540 | 1540 |
| |
1541 |
| - | |
1542 |
| - | |
1543 |
| - | |
1544 |
| - | |
1545 |
| - | |
1546 |
| - | |
1547 |
| - | |
1548 |
| - | |
1549 |
| - | |
1550 |
| - | |
1551 |
| - | |
1552 |
| - | |
1553 |
| - | |
1554 |
| - | |
1555 |
| - | |
1556 |
| - | |
1557 |
| - | |
1558 |
| - | |
1559 |
| - | |
1560 |
| - | |
1561 |
| - | |
1562 |
| - | |
1563 |
| - | |
1564 |
| - | |
1565 |
| - | |
1566 |
| - | |
1567 |
| - | |
1568 |
| - | |
1569 |
| - | |
1570 |
| - | |
1571 |
| - | |
1572 |
| - | |
1573 |
| - | |
1574 |
| - | |
1575 |
| - | |
1576 |
| - | |
1577 |
| - | |
1578 |
| - | |
1579 |
| - | |
1580 |
| - | |
1581 |
| - | |
1582 |
| - | |
1583 |
| - | |
1584 |
| - | |
1585 |
| - | |
1586 |
| - | |
1587 |
| - | |
1588 |
| - | |
1589 | 1541 |
| |
1590 | 1542 |
| |
1591 | 1543 |
| |
| |||
1669 | 1621 |
| |
1670 | 1622 |
| |
1671 | 1623 |
| |
1672 |
| - | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
1673 | 1627 |
| |
1674 | 1628 |
| |
1675 | 1629 |
| |
| |||
1680 | 1634 |
| |
1681 | 1635 |
| |
1682 | 1636 |
| |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
1683 | 1672 |
| |
1684 | 1673 |
| |
1685 | 1674 |
| |
| |||
4199 | 4188 |
| |
4200 | 4189 |
| |
4201 | 4190 |
| |
4202 |
| - | |
4203 |
| - | |
4204 | 4191 |
| |
4205 | 4192 |
| |
4206 | 4193 |
| |
| |||
4659 | 4646 |
| |
4660 | 4647 |
| |
4661 | 4648 |
| |
4662 |
| - | |
4663 |
| - | |
| 4649 | + | |
4664 | 4650 |
| |
4665 | 4651 |
| |
4666 | 4652 |
| |
| |||
4672 | 4658 |
| |
4673 | 4659 |
| |
4674 | 4660 |
| |
4675 |
| - | |
| 4661 | + | |
4676 | 4662 |
| |
4677 | 4663 |
| |
4678 | 4664 |
| |
| |||
4688 | 4674 |
| |
4689 | 4675 |
| |
4690 | 4676 |
| |
4691 |
| - | |
| 4677 | + | |
4692 | 4678 |
| |
4693 | 4679 |
| |
4694 | 4680 |
| |
| |||
5064 | 5050 |
| |
5065 | 5051 |
| |
5066 | 5052 |
| |
5067 |
| - | |
5068 |
| - | |
5069 | 5053 |
| |
5070 | 5054 |
| |
5071 | 5055 |
| |
|
Lines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
162 |
| - | |
163 |
| - | |
164 |
| - | |
165 |
| - | |
166 | 162 |
| |
167 | 163 |
| |
168 | 164 |
| |
|
0 commit comments
Comments
(0)