Commit 9b8a733
committed
Introduce wal_level GUC to explicitly control if information needed for
archival or hot standby should be WAL-logged, instead of deducing that from
other options like archive_mode. This replaces recovery_connections GUC in
the primary, where it now has no effect, but it's still used in the standby
to enable/disable hot standby.
Remove the WAL-logging of "unlogged operations", like creating an index
without WAL-logging and fsyncing it at the end. Instead, we keep a copy of
the wal_mode setting and the settings that affect how much shared memory a
hot standby server needs to track master transactions (max_connections,
max_prepared_xacts, max_locks_per_xact) in pg_control. Whenever the settings
change, at server restart, write a WAL record noting the new settings and
update pg_control. This allows us to notice the change in those settings in
the standby at the right moment, they used to be included in checkpoint
records, but that meant that a changed value was not reflected in the
standby until the first checkpoint after the change.
Bump PG_CONTROL_VERSION and XLOG_PAGE_MAGIC. Whack XLOG_PAGE_MAGIC back to
the sequence it used to follow, before hot standby and subsequent patches
changed it to 0x9003.1 parent a2de482 commit 9b8a733
File tree
22 files changed
+340
-224
lines changed- doc/src/sgml
- src
- backend
- access
- heap
- nbtree
- transam
- commands
- executor
- postmaster
- replication
- storage/ipc
- utils/misc
- bin
- pg_controldata
- pg_resetxlog
- include
- access
- catalog
- replication
22 files changed
+340
-224
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
693 | | - | |
| 692 | + | |
694 | 693 | | |
695 | 694 | | |
696 | 695 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
1353 | 1353 | | |
1354 | 1354 | | |
1355 | 1355 | | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 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 | + | |
1356 | 1395 | | |
1357 | 1396 | | |
1358 | 1397 | | |
| |||
1726 | 1765 | | |
1727 | 1766 | | |
1728 | 1767 | | |
1729 | | - | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
1730 | 1771 | | |
1731 | 1772 | | |
1732 | 1773 | | |
| |||
1818 | 1859 | | |
1819 | 1860 | | |
1820 | 1861 | | |
1821 | | - | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
1822 | 1865 | | |
1823 | 1866 | | |
1824 | 1867 | | |
| |||
1884 | 1927 | | |
1885 | 1928 | | |
1886 | 1929 | | |
1887 | | - | |
1888 | | - | |
1889 | | - | |
1890 | | - | |
1891 | | - | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | | - | |
1896 | | - | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
1897 | 1935 | | |
1898 | 1936 | | |
1899 | 1937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
1593 | 1593 | | |
1594 | 1594 | | |
1595 | 1595 | | |
1596 | | - | |
| 1596 | + | |
1597 | 1597 | | |
1598 | | - | |
| 1598 | + | |
1599 | 1599 | | |
1600 | 1600 | | |
1601 | 1601 | | |
| |||
1842 | 1842 | | |
1843 | 1843 | | |
1844 | 1844 | | |
1845 | | - | |
| 1845 | + | |
1846 | 1846 | | |
1847 | 1847 | | |
1848 | 1848 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
842 | 841 | | |
843 | 842 | | |
844 | 843 | | |
| |||
910 | 909 | | |
911 | 910 | | |
912 | 911 | | |
913 | | - | |
| 912 | + | |
914 | 913 | | |
915 | 914 | | |
916 | 915 | | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
926 | 924 | | |
927 | 925 | | |
928 | 926 | | |
929 | 927 | | |
930 | 928 | | |
931 | 929 | | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
936 | 933 | | |
937 | 934 | | |
938 | 935 | | |
| |||
1014 | 1011 | | |
1015 | 1012 | | |
1016 | 1013 | | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1021 | 1020 | | |
1022 | 1021 | | |
1023 | 1022 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 281 | | |
292 | 282 | | |
293 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | 218 | | |
232 | 219 | | |
233 | 220 | | |
| |||
0 commit comments