diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-06-26 20:29:04 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-06-26 20:29:04 +0000 |
commit | 2de48a83e65911ec8fc71fc87d75a75f5a3d6090 (patch) | |
tree | 3d1bcdc353f59e54e323185cf5456ba0dbc8c5c8 /src/backend/storage/smgr/md.c | |
parent | a6667d96c5e4aca92612295d549541146dd6e74a (diff) | |
download | postgresql-2de48a83e65911ec8fc71fc87d75a75f5a3d6090.tar.gz postgresql-2de48a83e65911ec8fc71fc87d75a75f5a3d6090.zip |
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
Diffstat (limited to 'src/backend/storage/smgr/md.c')
-rw-r--r-- | src/backend/storage/smgr/md.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c index 18402a6ad61..0c4861d6dbb 100644 --- a/src/backend/storage/smgr/md.c +++ b/src/backend/storage/smgr/md.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/smgr/md.c,v 1.147 2009/06/25 21:36:00 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/storage/smgr/md.c,v 1.148 2009/06/26 20:29:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -204,10 +204,10 @@ mdinit(void) } /* - * In archive recovery, we rely on bgwriter to do fsyncs(), but we don't - * know that we do archive recovery at process startup when pendingOpsTable - * has already been created. Calling this function drops pendingOpsTable - * and causes any subsequent requests to be forwarded to bgwriter. + * In archive recovery, we rely on bgwriter to do fsyncs, but we will have + * already created the pendingOpsTable during initialization of the startup + * process. Calling this function drops the local pendingOpsTable so that + * subsequent requests will be forwarded to bgwriter. */ void SetForwardFsyncRequests(void) |