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

From Heikki Linnakangas
Subject Re: FSM, now without WAL-logging
Date
Msg-id 48DAA339.3070805@enterprisedb.com
Whole thread Raw
In response to Re: FSM, now without WAL-logging  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: FSM, now without WAL-logging  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> Zdenek Kotala wrote:
>>> 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.
> 
> Whaddya mean there's no WAL record for that?  smgrtruncate produces one.

Ooh, I didn't realize that!

Hmm. The smgrtuncate WAL record is generated after the file is 
truncated, so there's still a small window there, where we can be left 
with a truncated main fork, but no smgrtruncate record for it, and thus 
the page of the FSM representing the truncated blocks doesn't get zeroed 
at replay.

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


pgsql-hackers by date:

Previous
From: "Robert Haas"
Date:
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)
Next
From: Tom Lane
Date:
Subject: Re: FSM, now without WAL-logging