Thread: pgsql: Don't allow walsender to send WAL data until it's been safely

pgsql: Don't allow walsender to send WAL data until it's been safely

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Don't allow walsender to send WAL data until it's been safely fsync'd on the
master.  Otherwise a subsequent crash could cause the master to lose WAL that
has already been applied on the slave, resulting in the slave being out of
sync and soon corrupt.  Per recent discussion and an example from Robert Haas.

Fujii Masao

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        xlog.c (r1.424 -> r1.425)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.424&r2=1.425)
    pgsql/src/backend/replication:
        walsender.c (r1.26 -> r1.27)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walsender.c?r1=1.26&r2=1.27)
    pgsql/src/include/access:
        xlog.h (r1.112 -> r1.113)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog.h?r1=1.112&r2=1.113)