pgsql: Update FSM on WAL replay.

Поиск
Список
Период
Сортировка
От heikki@postgresql.org (Heikki Linnakangas)
Тема pgsql: Update FSM on WAL replay.
Дата
Msg-id 20081031194027.2A0947545A4@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Update FSM on WAL replay. This is a bit limited; the FSM is only updated
on non-full-page-image WAL records, and quite arbitrarily, only if there's
less than 20% free space on the page after the insert/update (not on HOT
updates, though). The 20% cutoff should avoid most of the overhead, when
replaying a bulk insertion, for example, while ensuring that pages that
are full are marked as full in the FSM.

This is mostly to avoid the nasty worst case scenario, where you replay
from a PITR archive, and the FSM information in the base backup is really
out of date. If there was a lot of pages that the outdated FSM claims to
have free space, but don't actually have any, the first unlucky inserter
after the recovery would traverse through all those pages, just to find
out that they're full. We didn't have this problem with the old FSM
implementation, because we simply threw the FSM information away on a
non-clean shutdown.

Modified Files:
--------------
    pgsql/src/backend/access/heap:
        heapam.c (r1.267 -> r1.268)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c?r1=1.267&r2=1.268)
    pgsql/src/backend/storage/freespace:
        freespace.c (r1.65 -> r1.66)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/freespace/freespace.c?r1=1.65&r2=1.66)
    pgsql/src/include/storage:
        freespace.h (r1.29 -> r1.30)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/freespace.h?r1=1.29&r2=1.30)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Allow SQL-language functions to return the output of an
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: pgsql: Unite ReadBufferWithFork, ReadBufferWithStrategy, and