summaryrefslogtreecommitdiff
path: root/src/include/access
diff options
context:
space:
mode:
authorTom Lane2004-07-11 18:01:45 +0000
committerTom Lane2004-07-11 18:01:45 +0000
commit94d4d240bb5c75124a270d1b5fecab1822cd4728 (patch)
tree363326d8953a9d7a72006f22cf38299baac3dd41 /src/include/access
parent98e9775a3ad56754de1caa2558c66a0040933460 (diff)
Rename XLOG_BTREE_NEWPAGE xlog record type into XLOG_HEAP_NEWPAGE, and
shift support code into heapam.c accordingly. This is in service of soon-to-be-committed ALTER TABLE SET TABLESPACE code that will want to use this same record type for both heaps and indexes. Theoretically I should have forced initdb for this, but in practice there is no change in xlog contents because CVS tip will never really emit this record type anyhow...
Diffstat (limited to 'src/include/access')
-rw-r--r--src/include/access/htup.h17
-rw-r--r--src/include/access/nbtree.h15
2 files changed, 16 insertions, 16 deletions
diff --git a/src/include/access/htup.h b/src/include/access/htup.h
index fdcfc8dc6f1..37ba1164ec1 100644
--- a/src/include/access/htup.h
+++ b/src/include/access/htup.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.66 2004/07/01 00:51:38 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.67 2004/07/11 18:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -423,6 +423,8 @@ typedef HeapTupleData *HeapTuple;
#define XLOG_HEAP_UPDATE 0x20
#define XLOG_HEAP_MOVE 0x30
#define XLOG_HEAP_CLEAN 0x40
+#define XLOG_HEAP_NEWPAGE 0x50
+/* opcodes 0x60, 0x70 still free */
#define XLOG_HEAP_OPMASK 0x70
/*
* When we insert 1st item on new page in INSERT/UPDATE
@@ -491,7 +493,7 @@ typedef struct xl_heap_update
#define SizeOfHeapUpdate (offsetof(xl_heap_update, newtid) + SizeOfIptrData)
-/* This is what we need to know about page cleanup */
+/* This is what we need to know about vacuum page cleanup */
typedef struct xl_heap_clean
{
RelFileNode node;
@@ -501,4 +503,15 @@ typedef struct xl_heap_clean
#define SizeOfHeapClean (offsetof(xl_heap_clean, block) + sizeof(BlockNumber))
+/* This is for replacing a page's contents in toto */
+/* NB: this is used for indexes as well as heaps */
+typedef struct xl_heap_newpage
+{
+ RelFileNode node;
+ BlockNumber blkno; /* location of new page */
+ /* entire page contents follow at end of record */
+} xl_heap_newpage;
+
+#define SizeOfHeapNewpage (offsetof(xl_heap_newpage, blkno) + sizeof(BlockNumber))
+
#endif /* HTUP_H */
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index e8e4c46a820..6e2491532ad 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.78 2004/06/02 17:28:18 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.79 2004/07/11 18:01:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -197,7 +197,6 @@ typedef BTItemData *BTItem;
* metapage */
#define XLOG_BTREE_NEWROOT 0xA0 /* new root page */
#define XLOG_BTREE_NEWMETA 0xB0 /* update metadata page */
-#define XLOG_BTREE_NEWPAGE 0xC0 /* new index page during build */
/*
* All that we need to find changed index tuple
@@ -324,18 +323,6 @@ typedef struct xl_btree_newmeta
#define SizeOfBtreeNewmeta (sizeof(xl_btree_newmeta))
-/*
- * New index page log record. This is only used while building a new index.
- */
-typedef struct xl_btree_newpage
-{
- RelFileNode node;
- BlockNumber blkno; /* location of new page */
- /* entire page contents follow at end of record */
-} xl_btree_newpage;
-
-#define SizeOfBtreeNewpage (offsetof(xl_btree_newpage, blkno) + sizeof(BlockNumber))
-
/*
* Operator strategy numbers for B-tree have been moved to access/skey.h,