Re: New FSM patch

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New FSM patch
Date: 2008-09-18 19:38:25
Message-ID: 48D2AE31.8030207@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>>>> 1) remove WAL logging. I think that FSM record should be recovered
>>>> during processing of others WAL records (like insert, update).
>
> Why are we WAL-logging FSM operations at all? It's only a hint.

- to ensure self-consistency of the tree, so that if an upper-level page
says there's no free space on pages in range X-Z, there really isn't
- to avoid in-page corruption from torn pages
- to have the FSM useful immediately after recovery (warm standby, mainly)

> I think we could give serious consideration to not WAL-logging FSM,
> with maybe a tweak here or there to improve the odds of self-repair.

Yeah, I'm starting to lean towards that option too.

Hmm, we could have a vacuum pass over the FSM, fixing any corruption
from the torn-page problem, as well as updating the upper-level pages.
That leaves us just the problem of propagating the FSM information to
the standby, and that we could handle by updating the FSM in the redo
functions of heap and indexes.

That sounds like a good idea anyway, but we still haven't actually
established that the WAL-logging is causing the performance degradation
Zdenek observed.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-09-18 20:30:07 Re: New FSM patch
Previous Message Zdenek Kotala 2008-09-18 19:05:50 Re: FSM patch - performance test