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

pgsql: Rework subtransaction commit protocol for hot standby.

From: alvherre(at)postgresql(dot)org (Alvaro Herrera)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rework subtransaction commit protocol for hot standby.
Date: 2008-10-20 19:18:18
Message-ID: 20081020191818.507C57545A4@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Log Message:
-----------
Rework subtransaction commit protocol for hot standby.

This patch eliminates the marking of subtransactions as SUBCOMMITTED in pg_clog
during their commit; instead they remain in-progress until main transaction
commit.  At main transaction commit, the commit protocol is atomic-by-page
instead of one transaction at a time.  To avoid a race condition with some
subtransactions appearing committed before others in the case where they span
more than one pg_clog page, we conserve the logic that marks them subcommitted
before marking the parent committed.

Simon Riggs with minor help from me

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        README (r1.11 -> r1.12)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/README?r1=1.11&r2=1.12)
        clog.c (r1.47 -> r1.48)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/clog.c?r1=1.47&r2=1.48)
        transam.c (r1.76 -> r1.77)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/transam.c?r1=1.76&r2=1.77)
        twophase.c (r1.45 -> r1.46)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/twophase.c?r1=1.45&r2=1.46)
        xact.c (r1.265 -> r1.266)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c?r1=1.265&r2=1.266)
    pgsql/src/include/access:
        clog.h (r1.21 -> r1.22)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/clog.h?r1=1.21&r2=1.22)
        transam.h (r1.65 -> r1.66)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/transam.h?r1=1.65&r2=1.66)

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2008-10-20 19:23:28
Subject: Re: Subtransaction commits and Hot Standby
Previous:From: Mark Cave-AylandDate: 2008-10-20 19:12:24
Subject: Patch status for reducing de-TOAST overhead?

pgsql-committers by date

Next:From: Alvaro HerreraDate: 2008-10-20 20:38:25
Subject: pgsql: These functions no longer return a value, per complaint from
Previous:From: Teodor SigaevDate: 2008-10-20 16:35:15
Subject: pgsql: Remove support of backward scan in GiST.

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