summaryrefslogtreecommitdiff
path: root/src/backend/commands/tablespace.c
diff options
context:
space:
mode:
authorHeikki Linnakangas2009-01-20 18:59:37 +0000
committerHeikki Linnakangas2009-01-20 18:59:37 +0000
commitb2a667b9ee8ba8d54e92fddcb0ed8d30651be595 (patch)
tree6e01c62937710099b373bc9dced2b87027b8cb4c /src/backend/commands/tablespace.c
parentb287f0a39eafbd99dd9ac8e83a58234604961b0d (diff)
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/commands/tablespace.c')
-rw-r--r--src/backend/commands/tablespace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c
index 610d69358b6..54818ff34d7 100644
--- a/src/backend/commands/tablespace.c
+++ b/src/backend/commands/tablespace.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.59 2009/01/01 17:23:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.60 2009/01/20 18:59:37 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1276,6 +1276,9 @@ tblspc_redo(XLogRecPtr lsn, XLogRecord *record)
{
uint8 info = record->xl_info & ~XLR_INFO_MASK;
+ /* Backup blocks are not used in tblspc records */
+ Assert(!(record->xl_info & XLR_BKP_BLOCK_MASK));
+
if (info == XLOG_TBLSPC_CREATE)
{
xl_tblspc_create_rec *xlrec = (xl_tblspc_create_rec *) XLogRecGetData(record);