Re: WAL replay failure after file truncation(?) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WAL replay failure after file truncation(?)
Date
Msg-id 14292.1117202187@sss.pgh.pa.us
Whole thread Raw
In response to Re: WAL replay failure after file truncation(?)  (Hans-Jürgen Schönig <postgres@cybertec.at>)
Responses Re: WAL replay failure after file truncation(?)  (Hans-Jürgen Schönig <postgres@cybertec.at>)
List pgsql-hackers
Hans-Jürgen Schönig <postgres@cybertec.at> writes:
> My question is: What happens if the system is killed inside 
> rebuild_relation or inside swap_relfilenodes which is called by 
> rebuild_relation?

Nothing at all, because the system catalog updates aren't committed yet,
and we haven't done anything to the relation's old physical file.

If I were you I'd be looking into whether your disk hardware honors
write ordering properly.  This sounds like something allowed the
directory change to reach disk before the transaction commit WAL record
did; which is impossible if fsync is doing what it's supposed to.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: foreign keys and RI triggers
Next
From: Tom Lane
Date:
Subject: Re: Cost of XLogInsert CRC calculations