Thread: Crash during WAL recovery?

Crash during WAL recovery?

From
Peter Eisentraut
Date:
This snippet in xlog.c makes we wonder...
else if (ControlFile->state == DB_IN_RECOVERY){    elog(LOG, "Data Base System was interrupted being in recovery at
%s\n"        "\tThis propably means that some data blocks are corrupted\n"         "\tAnd you will have to use last
backupfor recovery",         str_time(ControlFile->time));}
 

I thought this was going to be crash safe.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



RE: Crash during WAL recovery?

From
"Mikheev, Vadim"
Date:
> This snippet in xlog.c makes we wonder...
> 
>     else if (ControlFile->state == DB_IN_RECOVERY)
>     {
>         elog(LOG, "Data Base System was interrupted 
> being in recovery at %s\n"
>              "\tThis propably means that some data 
> blocks are corrupted\n"
>              "\tAnd you will have to use last 
> backup for recovery",
>              str_time(ControlFile->time));
>     }
> 
> I thought this was going to be crash safe.

WAL doesn't protect against disk block corruption what
could be reason of crash (or elog(STOP)) during recovery
in most cases. Apart from disk corruption recovery is
(or should be -:)) crash safe.

Vadim


RE: Crash during WAL recovery?

From
Don Baccus
Date:
At 02:01 PM 11/21/00 -0800, Mikheev, Vadim wrote:
>> This snippet in xlog.c makes we wonder...
>> 
>>     else if (ControlFile->state == DB_IN_RECOVERY)
>>     {
>>         elog(LOG, "Data Base System was interrupted 
>> being in recovery at %s\n"
>>              "\tThis propably means that some data 
>> blocks are corrupted\n"
>>              "\tAnd you will have to use last 
>> backup for recovery",
>>              str_time(ControlFile->time));
>>     }
>> 
>> I thought this was going to be crash safe.
>
>WAL doesn't protect against disk block corruption what
>could be reason of crash (or elog(STOP)) during recovery
>in most cases. Apart from disk corruption recovery is
>(or should be -:)) crash safe.

Which is why we'll still need BAR tools later.

The WAL log can be used to recover from a crash if the database
itself isn't corrupted (disk corruption, whatever), but not
otherwise because it applies logged data to the database itself.

The WAL log doesn't include changes caused by renegade disk
controllers, etc :)

BAR tools will allow recovery via archives of WAL logs applied
to an archive of the database, to recreate the database in the
case where the existing database has been corrupted.

In Oracle parlance, "WAL" log == "REDO" log, and the BAR tool
builds "Archive" logs.

Uhhh...I think, anyway.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


RE: Crash during WAL recovery?

From
"Christopher Kings-Lynne"
Date:
Is there any particular reason the spelling and punctuation in the code
snippet below is so bad?

Chris

> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Peter Eisentraut
> Sent: Wednesday, November 22, 2000 6:04 AM
> To: PostgreSQL Development
> Subject: [HACKERS] Crash during WAL recovery?
>
>
> This snippet in xlog.c makes we wonder...
>
>     else if (ControlFile->state == DB_IN_RECOVERY)
>     {
>         elog(LOG, "Data Base System was interrupted being
> in recovery at %s\n"
>              "\tThis propably means that some data
> blocks are corrupted\n"
>              "\tAnd you will have to use last backup
> for recovery",
>              str_time(ControlFile->time));
>     }
>
> I thought this was going to be crash safe.
>
> --
> Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/
>



RE: Crash during WAL recovery?

From
Don Baccus
Date:
At 09:14 AM 11/22/00 +0800, Christopher Kings-Lynne wrote:
>Is there any particular reason the spelling and punctuation in the code
>snippet below is so bad?

Vadim's Russian.  This impacts his english but not his ability to implement
complex features like MVCC and WAL :)



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


RE: Crash during WAL recovery?

From
"Mikheev, Vadim"
Date:
> >Is there any particular reason the spelling and punctuation 
> in the code
> >snippet below is so bad?
> 
> Vadim's Russian.  This impacts his english but not his 
> ability to implement complex features like MVCC and WAL :)

Yes, sorry guys. C lang is much easier -:))

Vadim


Re: Crash during WAL recovery?

From
"Mitch Vincent"
Date:
Just speaking Russian and English both (to any degree) is absolutely
amazing, put that on top of MVCC and WAL and we have Vadim, the smartest
person alive! *grin*

-Mitch

----- Original Message -----
From: "Mikheev, Vadim" <vmikheev@SECTORBASE.COM>
To: "'Don Baccus'" <dhogaza@pacifier.com>; "Christopher Kings-Lynne"
<chriskl@familyhealth.com.au>; "PostgreSQL Development"
<pgsql-hackers@postgresql.org>
Sent: Tuesday, November 21, 2000 5:37 PM
Subject: RE: [HACKERS] Crash during WAL recovery?


> > >Is there any particular reason the spelling and punctuation
> > in the code
> > >snippet below is so bad?
> >
> > Vadim's Russian.  This impacts his english but not his
> > ability to implement complex features like MVCC and WAL :)
>
> Yes, sorry guys. C lang is much easier -:))
>
> Vadim
>



Re: Crash during WAL recovery?

From
Tom Lane
Date:
>> Is there any particular reason the spelling and punctuation in the code
>> snippet below is so bad?

> Vadim's Russian.  This impacts his english but not his ability to implement
> complex features like MVCC and WAL :)

As someone who can't speak anything but English worth a damn (even
though I was raised in Spanish-speaking countries, so you'd think
I'd have acquired at least one clue), I have long since learned not
to criticize the English of non-native speakers.  Many of the
participants in this project are doing far better than I would if
the tables were turned.  So, I fix grammatical and spelling errors
if I have another reason to be editing some piece of documentation,
but I never hold it against the original author.

More generally, a lot of the PG documentation could use the attention
of a professional copy editor --- and I'm sad to say that the parts
contributed by native English speakers aren't necessarily any cleaner
than the parts contributed by those who are not.  If you have the
time and energy to submit corrections, please fall to!
        regards, tom lane


Re: Crash during WAL recovery?

From
Bruce Momjian
Date:
> As someone who can't speak anything but English worth a damn (even
> though I was raised in Spanish-speaking countries, so you'd think
> I'd have acquired at least one clue), I have long since learned not
> to criticize the English of non-native speakers.  Many of the
> participants in this project are doing far better than I would if
> the tables were turned.  So, I fix grammatical and spelling errors
> if I have another reason to be editing some piece of documentation,
> but I never hold it against the original author.
> 
> More generally, a lot of the PG documentation could use the attention
> of a professional copy editor --- and I'm sad to say that the parts
> contributed by native English speakers aren't necessarily any cleaner
> than the parts contributed by those who are not.  If you have the
> time and energy to submit corrections, please fall to!

I did have AW's copyeditor go through the refence manual.  Would be nice
if they had done the other manuals too.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Crash during WAL recovery?

From
Don Baccus
Date:
At 12:29 AM 11/22/00 -0500, Tom Lane wrote:
>>> Is there any particular reason the spelling and punctuation in the code
>>> snippet below is so bad?
>
>> Vadim's Russian.  This impacts his english but not his ability to implement
>> complex features like MVCC and WAL :)
>
>As someone who can't speak anything but English worth a damn (even
>though I was raised in Spanish-speaking countries, so you'd think
>I'd have acquired at least one clue), I have long since learned not
>to criticize the English of non-native speakers.

I think it's certain that the original poster didn't realize Vadim is not
a native English speaker, which is why I made my comment (to clue him in).
Vadim didn't take my comment as criticism, as his follow-on post made clear
(he got the joke).  I don't know from your post if you thought I was adding
to the criticism or not, but I can say with certainty I wasn't.  In my
previous life as the founder of a company specializing in optimizing
compilers for minicomputers, I employed Dutch (who spoke and wrote English
than I or anyone here), Polish, Vietmanese and other nationals who were
excellent hackers and who all spoke better English than I spoke their 
language - or cooked their cuisine or even followed their table customs,
for that matter.

>More generally, a lot of the PG documentation could use the attention
>of a professional copy editor --- and I'm sad to say that the parts
>contributed by native English speakers aren't necessarily any cleaner
>than the parts contributed by those who are not.  If you have the
>time and energy to submit corrections, please fall to!

This is very much true.  PG needs some good documentation volunteers.
I'm not denigrating the current efforts, because PG documention's pretty 
good all things considered.  But some volunteers devoted to improving
the docs could accomplish a lot.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


Re: Crash during WAL recovery?

From
Tom Lane
Date:
> I don't know from your post if you thought I was adding
> to the criticism or not, but I can say with certainty I wasn't.

No, I saw that you understood perfectly, I just wanted to add another
two cents...

> I'm not denigrating the current efforts, because PG documention's pretty 
> good all things considered.  But some volunteers devoted to improving
> the docs could accomplish a lot.

Yup.  Anyone out there with the time and interest?
        regards, tom lane


RE: Crash during WAL recovery?

From
"Christopher Kings-Lynne"
Date:
> I think it's certain that the original poster didn't realize Vadim is not
> a native English speaker, which is why I made my comment (to clue him in).
> Vadim didn't take my comment as criticism, as his follow-on post
> made clear
> (he got the joke).  I don't know from your post if you thought I
> was adding
> to the criticism or not, but I can say with certainty I wasn't.  In my
> previous life as the founder of a company specializing in optimizing
> compilers for minicomputers, I employed Dutch (who spoke and wrote English
> than I or anyone here), Polish, Vietmanese and other nationals who were
> excellent hackers and who all spoke better English than I spoke their
> language - or cooked their cuisine or even followed their table customs,
> for that matter.

Just for the record, I apologise for criticising Valim's grammar.  I didn't
realise that he was a non-native speaker - nor that it was even his code.  I
just thought I should point out that spelling error (propably) given that
there was a thread going on about spelling in some error messages...

Chris



Re: Crash during WAL recovery?

From
"Robert B. Easter"
Date:
On Wednesday 22 November 2000 00:54, Tom Lane wrote:
> > I don't know from your post if you thought I was adding
> > to the criticism or not, but I can say with certainty I wasn't.
>
> No, I saw that you understood perfectly, I just wanted to add another
> two cents...
>
> > I'm not denigrating the current efforts, because PG documention's pretty
> > good all things considered.  But some volunteers devoted to improving
> > the docs could accomplish a lot.
>
> Yup.  Anyone out there with the time and interest?
>
>             regards, tom lane

I might be interested in helping with it.  Whats involved (DocBook, SGML)?

-- 
-------- Robert B. Easter  reaster@comptechnews.com ---------
- CompTechNews Message Board   http://www.comptechnews.com/ -
- CompTechServ Tech Services   http://www.comptechserv.com/ -
---------- http://www.comptechnews.com/~reaster/ ------------


Re: Crash during WAL recovery?

From
Thomas Lockhart
Date:
> I might be interested in helping with it.  Whats involved (DocBook, SGML)?

Yup. The PostgreSQL source tree has a docs directory with all of the
sources for the docs. I use emacs for editing, and several other options
are discussed in the appendix on documentation in the doc set.
                     - Thomas


Re: Crash during WAL recovery?

From
Hannu Krosing
Date:
Tom Lane wrote:
> 
> More generally, a lot of the PG documentation could use the attention
> of a professional copy editor --- and I'm sad to say that the parts
> contributed by native English speakers aren't necessarily any cleaner
> than the parts contributed by those who are not. 

The difference between native English speaker and English writer is that 
writer usually does not mix up dye and die ;)

But afaik there is no such language as Englis, so first we would need to 
agree on which of the many Englishes the docs will be in.

I guess they are currently in "International" English which is quite
free 
about grammar, spelling and punctuation.

I would hate if we all started to write in some more rigid dialect. 

I've heard that some of these even make you put the full stop at the end
of a 
sentence before closing parenthesiss (like this.)

They claim it is for "typographical aesthetics" ;)

----------
Hannu


Re: Crash during WAL recovery?

From
"Martin A. Marques"
Date:
On Wednesday 22 November 2000 02:36, Don Baccus wrote:
>
> >More generally, a lot of the PG documentation could use the attention
> >of a professional copy editor --- and I'm sad to say that the parts
> >contributed by native English speakers aren't necessarily any cleaner
> >than the parts contributed by those who are not.  If you have the
> >time and energy to submit corrections, please fall to!
>
> This is very much true.  PG needs some good documentation volunteers.
> I'm not denigrating the current efforts, because PG documention's pretty
> good all things considered.  But some volunteers devoted to improving
> the docs could accomplish a lot.

It would be a pleasure to help with the spanish docs, if any help is needed.

Saludos... :-)


-- 
"And I'm happy, because you make me feel good, about me." - Melvin Udall
-----------------------------------------------------------------
Mart�n Marqu�s            email:     martin@math.unl.edu.ar
Santa Fe - Argentina        http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------


Re: Crash during WAL recovery?

From
Thomas Lockhart
Date:
> It would be a pleasure to help with the spanish docs, if any help is needed.

There is a documentation translation effort hosted in Spain, and I'm
sure that they would welcome help to stay current (I believe that a
substantial portion of docs are already done for a recent, but perhaps
not current, set of docs). There should be a link to this from the
postgresql.org site.
                   - Thomas


postgres docs (was Re: Crash during WAL recovery?)

From
Norman Clarke
Date:
Hello,

Before the Thanksgiving holiday here in the US I had been following with 
great interest the thread regarding Vadim's English and the postgres docs. 
Since this was posted about 200 messages ago, I replied as a new thread... I 
hope you don't mind!

I am interested in volunteering some time to helping with the documentation 
if the developers feel that I could be of service. I am not a C coder, 
although I do a lot of CGI programming in PHP and Perl. Mostly I am a 
database and Unix systems administrator for Combimatrix, a biotech company 
near Seattle, Washington. Although I'm not a technical writer, I have some 
background in writing, having been an English composition instructor at the 
University of Connecticut and a Spanish and Linguistics major in college 
before that. 

I'm fairly new to Postgres, but for the last two months I have been helping 
develop applications in Java and PHP that rely on it, and have become by and 
large comfortable with it. I had used MySQL for most of my work over the last 
two years and now find myself wondering how I ever got anything done.

Please, no one should take this the wrong way, but despite its lack of 
important features relative to Postgres, I very much enjoyed working with 
MySQL in large part because of its nicely organized and constantly updated 
documentation. Quite honestly this is the one area where Postgres still needs 
to catch up, and if there's any way at all I can help make that happen I 
would like to be involved.

So, if you think I can be of any service, please let me know.

Best regards,

Norm

> >More generally, a lot of the PG documentation could use the attention
> >of a professional copy editor --- and I'm sad to say that the parts
> >contributed by native English speakers aren't necessarily any cleaner
> >than the parts contributed by those who are not.  If you have the
> >time and energy to submit corrections, please fall to!


Re: postgres docs (was Re: Crash during WAL recovery?)

From
Thomas Lockhart
Date:
> So, if you think I can be of any service, please let me know.

We already know that you can be of service :)

There are two ways to go about this:

1) pick something in the docs to fix. A topic, or organization, or
whatever you think is a good candidate for improvement or inclusion. Run
big changes by the -hackers or -docs mailing list to make sure you have
a consensus that the change is desirable, then go do it! Small changes
such as wording fixes can just be done and submitted as patches without
needing a peer review or consensus imho.

2) fix something that someone else thinks should be fixed. Same process
as before, and you might end up solving something bugging the rest of us
for a long time. But maybe less satisfying for you than (1) might be.

Either works. This list is never short of suggestions if you want to try
(2).

Welcome!
                   - Thomas


Re: postgres docs (was Re: Crash during WAL recovery?)

From
Peter Eisentraut
Date:
Norman Clarke writes:

> I am interested in volunteering some time to helping with the documentation

Good.  Not sure exactly what you want to do, but we need help in just
about every area, including proof-reading/copy-editing sort of stuff,
markup/consistency improvements, verification of examples, trying out the
outlined procedures from the point of view of a naïve user, rewriting old
stuff, documenting new stuff, etc.

Since we're going beta any minute now the primary focus would currently be
on getting everything completed and updated, rather than undertaking major
rewrites.

The Developer's Guide which should be found at or near
www.postgresql.org/devel-corner/docs has an appendix that explains how the
documentation is handled.  Contributions are accepted even if you don't
completely understand DocBook or don't want to bother installing the
tools.  (OTOH, it's very rewarding to have installed the tools and to have
understood DocBook. :-))

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/