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

From Heikki Linnakangas
Subject Re: FSM, now without WAL-logging
Date
Msg-id 48DA7943.4000102@enterprisedb.com
Whole thread Raw
In response to Re: FSM, now without WAL-logging  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List pgsql-hackers
Zdenek Kotala wrote:
> Heikki Linnakangas napsal(a):
> 
>> It would be 
>> simple to update the FSM at every heap insert and update record, but 
>> that then might be an unacceptable amount of overhead at recovery. Also, 
>> the index FSM is not yet updated during recovery.
> 
> I expect locking problems specially on small tables where FSM has only one level
> instead slower recovery. Maybe background writer could update FSM info, but it
> breaks modularity and It could bring problems during checkpoints.

Recovery is single-threaded (for the lack of a better word) anyway, so
there can't be other backends competing for the locks. Background writer
is one option.

One option is to update the FSM if there's less than X% of free space on
the page left after the insert/update. That would be similar to the rule
we use during normal operation, which is to update the FSM whenever the
target page fills up and we have to get a new page from the FSM.

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


pgsql-hackers by date:

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