From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: xlog loose ends, continued |
Date: | 2001-03-13 04:41:02 |
Message-ID: | 17959.984458462@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM> writes:
> This code was from the old days when there was no CRC in log records.
Ah, right. The CRC makes things safer ... but there's still a risk
that old log pages could look like a valid continuation.
> Should we try to read log up to the *physical end* - ie end of last
> log file - regardless invalid CRC-s/zero pages with attempt to
> re-apply interim valid records? (Or do we already do this?)
That doesn't seem like a good idea --- once we fail to read an XLOG
record, it's probably best to stop there rather than continue on.
I think we want to try for a consistent recovery to a past point in
time (ie, wherever the xlog gap is) not a partial recovery to a later
time.
> Anyway I like idea of StartUpID in page headers - this will help
> if some log files disappeared. Should we add CRC to page header?
That seems like overkill. I was hoping to keep the page header overhead
at eight bytes. We could do that either by storing just the two LSBs
of StartUpID (and doing the sequence checking mod 64k) or by reducing
the magic number to two bytes so there's room for four bytes of
StartUpID. I think I like the first alternative better --- comments?
> Hm, maybe XLogFileInit should initialize files with StartUpID & CRC
> in pages? We would avoid reading empty files.
We already stop when we hit a zeroed page (because it's not got the
right magic number). That seems sufficient.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Mikheev, Vadim | 2001-03-13 04:45:27 | RE: xlog checkpoint depends on sync() ... seems unsafe |
Previous Message | Mikheev, Vadim | 2001-03-13 04:24:26 | RE: xlog loose ends, continued |