- Notifications
You must be signed in to change notification settings - Fork28
Commit7d4d5c0
committed
Arrange to recycle old XLOG log segment files as new segment files,
rather than deleting them only to have to create more. Steady stateis 2*CHECKPOINT_SEGMENTS + WAL_FILES + 1 segment files, which willsimply be renamed rather than constantly deleted and recreated.To make this safe, added current XLOG file/offset number to pageheader of XLOG pages, so that an un-overwritten page from an oldincarnation of a logfile can be reliably told from a valid page.This change means that if you try to restart postmaster in a CVS-tipdatabase after installing the change, you'll get a complaint aboutbad XLOG page magic number. If you don't want to initdb, runcontrib/pg_resetxlog (and be sure you shut down the old postmastercleanly).1 parent8b77efd commit7d4d5c0
File tree
3 files changed
+198
-73
lines changed- contrib/pg_resetxlog
- src
- backend/access/transam
- include/access
3 files changed
+198
-73
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
860 | 864 | | |
861 | 865 | | |
862 | 866 | | |
| |||
0 commit comments
Comments
(0)