diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-01-20 18:59:37 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-01-20 18:59:37 +0000 |
commit | b2a667b9ee8ba8d54e92fddcb0ed8d30651be595 (patch) | |
tree | 6e01c62937710099b373bc9dced2b87027b8cb4c /src/backend/commands/sequence.c | |
parent | b287f0a39eafbd99dd9ac8e83a58234604961b0d (diff) | |
download | postgresql-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/commands/sequence.c')
-rw-r--r-- | src/backend/commands/sequence.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index c8f513d2da7..d68f525ba02 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.156 2009/01/01 17:23:39 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.157 2009/01/20 18:59:37 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -1339,6 +1339,9 @@ seq_redo(XLogRecPtr lsn, XLogRecord *record) xl_seq_rec *xlrec = (xl_seq_rec *) XLogRecGetData(record); sequence_magic *sm; + /* Backup blocks are not used in seq records */ + Assert(!(record->xl_info & XLR_BKP_BLOCK_MASK)); + if (info != XLOG_SEQ_LOG) elog(PANIC, "seq_redo: unknown op code %u", info); |