Rework subtransaction commit protocol for hot standby.

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 06da3c570f21394003fc392d80f54862f7dec19f
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2008-10-20T19:18:18Z
Releases: 8.4.0
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

Files