Skip site navigation (1) Skip section navigation (2)

pgsql: Write an end-of-backup WAL record at pg_stop_backup(), and wait

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Write an end-of-backup WAL record at pg_stop_backup(), and wait
Date: 2010-01-04 12:50:50
Message-ID: 20100104125050.1DEB9753FB7@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Write an end-of-backup WAL record at pg_stop_backup(), and wait for it at
recovery instead of reading the backup history file. This is more robust,
as it stops you from prematurely starting up an inconsisten cluster if the
backup history file is lost for some reason, or if the base backup was
never finished with pg_stop_backup().

This also paves the way for a simpler streaming replication patch, which
doesn't need to care about backup history files anymore.

The backup history file is still created and archived as before, but it's
not used by the system anymore. It's just for informational purposes now.

Bump PG_CONTROL_VERSION as the location of the backup startpoint is now
written to a new field in pg_control, and catversion because initdb is
required

Original patch by Fujii Masao per Simon's idea, with further fixes by me.

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        xlog.c (r1.356 -> r1.357)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.356&r2=1.357)
    pgsql/src/bin/pg_controldata:
        pg_controldata.c (r1.45 -> r1.46)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_controldata/pg_controldata.c?r1=1.45&r2=1.46)
    pgsql/src/bin/pg_resetxlog:
        pg_resetxlog.c (r1.76 -> r1.77)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c?r1=1.76&r2=1.77)
    pgsql/src/include/catalog:
        catversion.h (r1.565 -> r1.566)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.565&r2=1.566)
        pg_control.h (r1.47 -> r1.48)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_control.h?r1=1.47&r2=1.48)

pgsql-committers by date

Next:From: Greg StarkDate: 2010-01-04 13:29:52
Subject: Re: pgsql: When estimating the selectivity of an inequality "column >
Previous:From: User MhasegawaDate: 2010-01-04 07:51:53
Subject: pgbulkload - pgbulkload: - Support encoding conversion (ENCODING =

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group