pgsql: Cleanup and code review for the patch that made bgwriter active

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Cleanup and code review for the patch that made bgwriter active
Date: 2009-06-26 20:29:04
Message-ID: 20090626202904.EA62275331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Cleanup and code review for the patch that made bgwriter active during
archive recovery. Invent a separate state variable and inquiry function
for XLogInsertAllowed() to clarify some tests and make the management of
writing the end-of-recovery checkpoint less klugy. Fix several places
that were incorrectly testing InRecovery when they should be looking at
RecoveryInProgress or XLogInsertAllowed (because they will now be executed
in the bgwriter not startup process). Clarify handling of bad LSNs passed
to XLogFlush during recovery. Use a spinlock for setting/testing
SharedRecoveryInProgress. Improve quite a lot of comments.

Heikki and Tom

Modified Files:
--------------
pgsql/src/backend/access/transam:
multixact.c (r1.30 -> r1.31)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/multixact.c?r1=1.30&r2=1.31)
xlog.c (r1.344 -> r1.345)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.344&r2=1.345)
pgsql/src/backend/postmaster:
bgwriter.c (r1.61 -> r1.62)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c?r1=1.61&r2=1.62)
postmaster.c (r1.582 -> r1.583)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c?r1=1.582&r2=1.583)
pgsql/src/backend/storage/smgr:
md.c (r1.147 -> r1.148)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/smgr/md.c?r1=1.147&r2=1.148)
pgsql/src/include/access:
xlog.h (r1.92 -> r1.93)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog.h?r1=1.92&r2=1.93)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-06-26 22:06:11 pgsql: Marginal improvement of description of recovery_end_command.
Previous Message Peter Eisentraut 2009-06-26 19:33:52 pgsql: Translation updates for 8.4 release.