1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Remove the mostly-stubbed-out-anyway support routines for WAL UNDO.

That code is never going to be used in the foreseeable future, and
where it's more than a stub it's making the redo routines harder to
read.
This commit is contained in:
Tom Lane
2005-06-06 17:01:25 +00:00
parent 928b06a6cc
commit 4c8495a1f2
30 changed files with 368 additions and 646 deletions

View File

@@ -24,7 +24,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/clog.c,v 1.28 2004/12/31 21:59:29 pgsql Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/clog.c,v 1.29 2005/06/06 17:01:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -411,11 +411,6 @@ clog_redo(XLogRecPtr lsn, XLogRecord *record)
}
}
void
clog_undo(XLogRecPtr lsn, XLogRecord *record)
{
}
void
clog_desc(char *buf, uint8 xl_info, char *rec)
{

View File

@@ -3,7 +3,7 @@
*
* Resource managers definition
*
* $PostgreSQL: pgsql/src/backend/access/transam/rmgr.c,v 1.17 2005/05/17 03:34:18 neilc Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/rmgr.c,v 1.18 2005/06/06 17:01:22 tgl Exp $
*/
#include "postgres.h"
@@ -22,21 +22,20 @@
const RmgrData RmgrTable[RM_MAX_ID + 1] = {
{"XLOG", xlog_redo, xlog_undo, xlog_desc, NULL, NULL},
{"Transaction", xact_redo, xact_undo, xact_desc, NULL, NULL},
{"Storage", smgr_redo, smgr_undo, smgr_desc, NULL, NULL},
{"CLOG", clog_redo, clog_undo, clog_desc, NULL, NULL},
{"Database", dbase_redo, dbase_undo, dbase_desc, NULL, NULL},
{"Tablespace", tblspc_redo, tblspc_undo, tblspc_desc, NULL, NULL},
{"Reserved 6", NULL, NULL, NULL, NULL, NULL},
{"Reserved 7", NULL, NULL, NULL, NULL, NULL},
{"Reserved 8", NULL, NULL, NULL, NULL, NULL},
{"Reserved 9", NULL, NULL, NULL, NULL, NULL},
{"Heap", heap_redo, heap_undo, heap_desc, NULL, NULL},
{"Btree", btree_redo, btree_undo, btree_desc,
btree_xlog_startup, btree_xlog_cleanup},
{"Hash", hash_redo, hash_undo, hash_desc, NULL, NULL},
{"Rtree", rtree_redo, rtree_undo, rtree_desc, NULL, NULL},
{"Gist", gist_redo, gist_undo, gist_desc, NULL, NULL},
{"Sequence", seq_redo, seq_undo, seq_desc, NULL, NULL}
{"XLOG", xlog_redo, xlog_desc, NULL, NULL},
{"Transaction", xact_redo, xact_desc, NULL, NULL},
{"Storage", smgr_redo, smgr_desc, NULL, NULL},
{"CLOG", clog_redo, clog_desc, NULL, NULL},
{"Database", dbase_redo, dbase_desc, NULL, NULL},
{"Tablespace", tblspc_redo, tblspc_desc, NULL, NULL},
{"Reserved 6", NULL, NULL, NULL, NULL},
{"Reserved 7", NULL, NULL, NULL, NULL},
{"Reserved 8", NULL, NULL, NULL, NULL},
{"Reserved 9", NULL, NULL, NULL, NULL},
{"Heap", heap_redo, heap_desc, NULL, NULL},
{"Btree", btree_redo, btree_desc, btree_xlog_startup, btree_xlog_cleanup},
{"Hash", hash_redo, hash_desc, NULL, NULL},
{"Rtree", rtree_redo, rtree_desc, NULL, NULL},
{"Gist", gist_redo, gist_desc, NULL, NULL},
{"Sequence", seq_redo, seq_desc, NULL, NULL}
};

View File

@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.202 2005/05/19 23:58:51 tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.203 2005/06/06 17:01:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -3844,17 +3844,6 @@ xact_redo(XLogRecPtr lsn, XLogRecord *record)
elog(PANIC, "xact_redo: unknown op code %u", info);
}
void
xact_undo(XLogRecPtr lsn, XLogRecord *record)
{
uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_XACT_COMMIT) /* shouldn't be called by XLOG */
elog(PANIC, "xact_undo: can't undo committed xaction");
else if (info != XLOG_XACT_ABORT)
elog(PANIC, "xact_redo: unknown op code %u", info);
}
void
xact_desc(char *buf, uint8 xl_info, char *rec)
{

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.195 2005/06/02 05:55:28 tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.196 2005/06/06 17:01:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2372,7 +2372,7 @@ RestoreBkpBlocks(XLogRecord *record, XLogRecPtr lsn)
memcpy(&bkpb, blk, sizeof(BkpBlock));
blk += sizeof(BkpBlock);
reln = XLogOpenRelation(true, record->xl_rmid, bkpb.node);
reln = XLogOpenRelation(bkpb.node);
if (reln)
{
@@ -5308,11 +5308,6 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
}
}
void
xlog_undo(XLogRecPtr lsn, XLogRecord *record)
{
}
void
xlog_desc(char *buf, uint8 xl_info, char *rec)
{

View File

@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlogutils.c,v 1.37 2005/05/29 04:23:03 tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlogutils.c,v 1.38 2005/06/06 17:01:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -186,7 +186,7 @@ XLogCloseRelationCache(void)
* Open a relation during XLOG replay
*/
Relation
XLogOpenRelation(bool redo, RmgrId rmid, RelFileNode rnode)
XLogOpenRelation(RelFileNode rnode)
{
XLogRelDesc *res;
XLogRelCacheEntry *hentry;