Thread
-
RE: xlog loose ends, continued
Mikheev, Vadim <vmikheev@sectorbase.com> — 2001-03-13T18:15:02Z
> >> xlog.c's ReadRecord formerly contained code that would zero > >> out the rest of the log segment (and delete the next log segment, > >> if any) upon detecting a missing or corrupted xlog record. > >> I removed that code because I considered it horribly dangerous > >> where it was. If there is anything wrong with either the xlog or > >> pg_control's pointers to it, that code was quite capable of wiping > >> out all hope of recovery *and* all evidence of what went wrong. > > ^^^^^^^^^^^^^^^^^^^^^^^^ > > What I was thinking about in that last paragraph was manual > analysis and recovery. I don't think it's a good idea for automatic > system startup to skip over gaps in the log. But if we'll not try to read after gap then after restart system will not notice gap and valid records after it and just rewrite log space with new records. Not much chance for manual analysis - ppl will not report any problems. Vadim
-
Re: xlog loose ends, continued
Tom Lane <tgl@sss.pgh.pa.us> — 2001-03-13T18:20:14Z
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes: >> What I was thinking about in that last paragraph was manual >> analysis and recovery. I don't think it's a good idea for automatic >> system startup to skip over gaps in the log. > But if we'll not try to read after gap then after restart system will > not notice gap and valid records after it and just rewrite log space > with new records. Not much chance for manual analysis - ppl will > not report any problems. That'll be true in any case, unless we refuse to start up at all upon detecting xlog corruption (which doesn't seem like the way to fly). Not sure what we can do about that. regards, tom lane
-
Re: Re: xlog loose ends, continued
Justin Clift <aa2@bigpond.net.au> — 2001-03-14T01:10:52Z
Maybe there should be an error message like : "PostgreSQL has detected severe xlog corruption. Please fix this with pg_recover (or similar) manually before restarting the database"? Guess I'm suggesting a separate xlog recovery tool for "bad cases" of xlog corruption, so decisions can by manually made by a DBA where necessary. Not everything has to be automatic I'm thinking. There are probably times where the dBA would prefer behaviour that doesn't seem intuitive anyway. Regards and best wishes, Justin Clift Tom Lane wrote: > > "Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes: > >> What I was thinking about in that last paragraph was manual > >> analysis and recovery. I don't think it's a good idea for automatic > >> system startup to skip over gaps in the log. > > > But if we'll not try to read after gap then after restart system will > > not notice gap and valid records after it and just rewrite log space > > with new records. Not much chance for manual analysis - ppl will > > not report any problems. > > That'll be true in any case, unless we refuse to start up at all upon > detecting xlog corruption (which doesn't seem like the way to fly). > Not sure what we can do about that. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://www.postgresql.org/search.mpl