summaryrefslogtreecommitdiff
path: root/src/include/access/htup.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-07-11 18:01:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-07-11 18:01:45 +0000
commit94d4d240bb5c75124a270d1b5fecab1822cd4728 (patch)
tree363326d8953a9d7a72006f22cf38299baac3dd41 /src/include/access/htup.h
parent98e9775a3ad56754de1caa2558c66a0040933460 (diff)
downloadpostgresql-94d4d240bb5c75124a270d1b5fecab1822cd4728.tar.gz
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/htup.h')
-rw-r--r--src/include/access/htup.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/include/access/htup.h b/src/include/access/htup.h
index fdcfc8dc6f..37ba1164ec 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 */