aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/clog.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-01-20 18:59:37 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-01-20 18:59:37 +0000
commitb2a667b9ee8ba8d54e92fddcb0ed8d30651be595 (patch)
tree6e01c62937710099b373bc9dced2b87027b8cb4c /src/backend/access/transam/clog.c
parentb287f0a39eafbd99dd9ac8e83a58234604961b0d (diff)
downloadpostgresql-b2a667b9ee8ba8d54e92fddcb0ed8d30651be595.tar.gz
postgresql-b2a667b9ee8ba8d54e92fddcb0ed8d30651be595.zip
Add a new option to RestoreBkpBlocks() to indicate if a cleanup lock should
be used instead of the normal exclusive lock, and make WAL redo functions responsible for calling RestoreBkpBlocks(). They know better what kind of a lock they need. At the moment, this just moves things around with no functional change, but makes the hot standby patch that's under review cleaner.
Diffstat (limited to 'src/backend/access/transam/clog.c')
-rw-r--r--src/backend/access/transam/clog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index e9c422b85ef..368d2c9d1a5 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -26,7 +26,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/clog.c,v 1.51 2009/01/01 17:23:36 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/clog.c,v 1.52 2009/01/20 18:59:37 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -684,6 +684,9 @@ clog_redo(XLogRecPtr lsn, XLogRecord *record)
{
uint8 info = record->xl_info & ~XLR_INFO_MASK;
+ /* Backup blocks are not used in clog records */
+ Assert(!(record->xl_info & XLR_BKP_BLOCK_MASK));
+
if (info == CLOG_ZEROPAGE)
{
int pageno;