Re: FSM, now without WAL-logging - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: FSM, now without WAL-logging
Date
Msg-id 48DA77EB.6050205@enterprisedb.com
Whole thread Raw
In response to Re: FSM, now without WAL-logging  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: FSM, now without WAL-logging  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Zdenek Kotala wrote:
> Heikki Linnakangas napsal(a):
>> There's one known bug left. If we crash after truncating a relation, and 
>> the truncation of the FSM doesn't hit the disk but the truncation of the 
>> main fork does, we can end up with an FSM that shows that there's free 
>> space on pages that don't exist anymore. The straightforward way to fix 
>> that is to put back the WAL-logging of FSM truncations, but given that I 
>> just ripped off all the rest of the WAL-logging, does anyone have other 
>> ideas?
> 
> What's about truncate FSM during WAL replay of main fork truncation record?

That would work, except that there's no WAL record for truncating the
main fork.

I considered adding that, WAL-logging the truncation of the main fork,
in vacuum.c. But it would have to be done for all indexams that use the
FSM as well.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)
Next
From: Heikki Linnakangas
Date:
Subject: Re: FSM, now without WAL-logging