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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-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)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-10-20 20:38:25 | pgsql: These functions no longer return a value, per complaint from |
Previous Message | Teodor Sigaev | 2008-10-20 16:35:15 | pgsql: Remove support of backward scan in GiST. |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-10-20 19:23:28 | Re: Subtransaction commits and Hot Standby |
Previous Message | Mark Cave-Ayland | 2008-10-20 19:12:24 | Patch status for reducing de-TOAST overhead? |