pgsql: Fix some serious bugs in archive recovery, now that bgwriter is

Поиск
Список
Период
Сортировка
От heikki@postgresql.org (Heikki Linnakangas)
Тема pgsql: Fix some serious bugs in archive recovery, now that bgwriter is
Дата
Msg-id 20090625213601.0ABF6753336@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix some serious bugs in archive recovery, now that bgwriter is active
during it:

When bgwriter is active, the startup process can't perform mdsync() correctly
because it won't see the fsync requests accumulated in bgwriter's private
pendingOpsTable. Therefore make bgwriter responsible for the end-of-recovery
checkpoint as well, when it's active.

When bgwriter is active (= archive recovery), the startup process must not
accumulate fsync requests to its own pendingOpsTable, since bgwriter won't
see them there when it performs restartpoints. Make startup process drop its
pendingOpsTable when bgwriter is launched to avoid that.

Update minimum recovery point one last time when leaving archive recovery.
It won't be updated by the end-of-recovery checkpoint because XLogFlush()
sees us as out of recovery already.

This fixes bug #4879 reported by Fujii Masao.

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        xlog.c (r1.343 -> r1.344)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.343&r2=1.344)
    pgsql/src/backend/postmaster:
        bgwriter.c (r1.60 -> r1.61)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c?r1=1.60&r2=1.61)
    pgsql/src/backend/storage/smgr:
        md.c (r1.146 -> r1.147)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/smgr/md.c?r1=1.146&r2=1.147)
    pgsql/src/include/access:
        xlog.h (r1.91 -> r1.92)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog.h?r1=1.91&r2=1.92)
    pgsql/src/include/storage:
        smgr.h (r1.67 -> r1.68)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/smgr.h?r1=1.67&r2=1.68)

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

Предыдущее
От: petere@postgresql.org (Peter Eisentraut)
Дата:
Сообщение: pgsql: Man pages back to lowercase names, with additional fixup to make
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Add __attribute__((format_arg(1))) to the declaration of