Re: Unlogged tables can vanish after a crash - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Unlogged tables can vanish after a crash
Date
Msg-id 20141119114249.GE17845@awork2.anarazel.de
Whole thread Raw
In response to Unlogged tables can vanish after a crash  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Responses Re: Unlogged tables can vanish after a crash  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-hackers
Hi,

On 2014-11-19 11:26:56 +0000, Albe Laurenz wrote:
> I observed an interesting (and I think buggy) behaviour today after one of
> our clusters crashed due to an "out of space" condition in the data directory.

Hah, just a couple days I pushed a fix for that ;)

http://archives.postgresql.org/message-id/20140912112246.GA4984%40alap3.anarazel.de
and
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d3586fc8aa5d9365a5c50cb5e555971eb633a4ec

> So no crash recovery was performed, probably because the startup process
> failed *after* it completed the end-of-recovery checkpoint.
> 
> Now the main fork files for all five unlogged tables are gone; the init fork files
> are still there.

You can "recover" them by restarting with -m immediate or so again.

> It seems to me that the right fix would be to recreate the unlogged
> relations *before* the checkpoint.

Yep, that's what we're doing now.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: tracking commit timestamps
Next
From: Albe Laurenz
Date:
Subject: Re: Unlogged tables can vanish after a crash