*/
#include "postgres.h"
+
#include "access/gin.h"
#include "access/tuptoaster.h"
+#include "storage/bufmgr.h"
/*
* forms tuple for entry tree. On leaf page, Index tuple has
#include "catalog/namespace.h"
#include "miscadmin.h"
#include "pgstat.h"
+#include "storage/bufmgr.h"
#include "storage/lmgr.h"
#include "storage/procarray.h"
#include "storage/smgr.h"
#include "postgres.h"
#include "access/hio.h"
-#include "storage/bufpage.h"
+#include "storage/bufmgr.h"
#include "storage/freespace.h"
#include "storage/lmgr.h"
#include "access/transam.h"
#include "miscadmin.h"
#include "pgstat.h"
-#include "storage/bufpage.h"
+#include "storage/bufmgr.h"
#include "storage/off.h"
#include "utils/inval.h"
#include "utils/tqual.h"
#include "access/rewriteheap.h"
#include "access/transam.h"
#include "access/tuptoaster.h"
+#include "storage/bufmgr.h"
#include "storage/smgr.h"
#include "utils/memutils.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/bgwriter.h"
-#include "storage/bufpage.h"
+#include "storage/bufmgr.h"
#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/pmsignal.h"
#include "postgres.h"
#include "access/xlogutils.h"
-#include "storage/bufpage.h"
+#include "storage/bufmgr.h"
#include "storage/smgr.h"
#include "utils/hsearch.h"
#include "parser/parse_relation.h"
#include "pgstat.h"
#include "postmaster/autovacuum.h"
+#include "storage/bufmgr.h"
#include "storage/proc.h"
#include "storage/procarray.h"
#include "utils/acl.h"
#include "miscadmin.h"
#include "postmaster/bgwriter.h"
#include "storage/buf_internals.h"
-#include "storage/bufpage.h"
+#include "storage/bufmgr.h"
#include "storage/ipc.h"
#include "storage/proc.h"
#include "storage/smgr.h"
#define BUFMGR_H
#include "storage/buf.h"
+#include "storage/bufpage.h"
#include "utils/rel.h"
typedef void *Block;
(Block) (BufferBlocks + ((Size) ((buffer) - 1)) * BLCKSZ) \
)
+/*
+ * BufferGetPageSize
+ * Returns the page size within a buffer.
+ *
+ * Notes:
+ * Assumes buffer is valid.
+ *
+ * The buffer can be a raw disk block and need not contain a valid
+ * (formatted) disk page.
+ */
+/* XXX should dig out of buffer descriptor */
+#define BufferGetPageSize(buffer) \
+( \
+ AssertMacro(BufferIsValid(buffer)), \
+ (Size)BLCKSZ \
+)
+
+/*
+ * BufferGetPage
+ * Returns the page associated with a buffer.
+ */
+#define BufferGetPage(buffer) ((Page)BufferGetBlock(buffer))
+
/*
* prototypes for functions in bufmgr.c
*/
#define BUFPAGE_H
#include "access/xlogdefs.h"
-#include "storage/bufmgr.h"
#include "storage/item.h"
#include "storage/off.h"
(Item)(((char *)(page)) + ItemIdGetOffset(itemId)) \
)
-/*
- * BufferGetPageSize
- * Returns the page size within a buffer.
- *
- * Notes:
- * Assumes buffer is valid.
- *
- * The buffer can be a raw disk block and need not contain a valid
- * (formatted) disk page.
- */
-/* XXX should dig out of buffer descriptor */
-#define BufferGetPageSize(buffer) \
-( \
- AssertMacro(BufferIsValid(buffer)), \
- (Size)BLCKSZ \
-)
-
-/*
- * BufferGetPage
- * Returns the page associated with a buffer.
- */
-#define BufferGetPage(buffer) ((Page)BufferGetBlock(buffer))
-
/*
* PageGetMaxOffsetNumber
* Returns the maximum offset number used by the given page.