Header And Logo

PostgreSQL
| The world's most advanced open source database.

relmapper.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * relmapper.h
00004  *    Catalog-to-filenode mapping
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/include/utils/relmapper.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef RELMAPPER_H
00015 #define RELMAPPER_H
00016 
00017 #include "access/xlog.h"
00018 
00019 /* ----------------
00020  *      relmap-related XLOG entries
00021  * ----------------
00022  */
00023 
00024 #define XLOG_RELMAP_UPDATE      0x00
00025 
00026 typedef struct xl_relmap_update
00027 {
00028     Oid         dbid;           /* database ID, or 0 for shared map */
00029     Oid         tsid;           /* database's tablespace, or pg_global */
00030     int32       nbytes;         /* size of relmap data */
00031     char        data[1];        /* VARIABLE LENGTH ARRAY */
00032 } xl_relmap_update;
00033 
00034 #define MinSizeOfRelmapUpdate offsetof(xl_relmap_update, data)
00035 
00036 
00037 extern Oid  RelationMapOidToFilenode(Oid relationId, bool shared);
00038 
00039 extern void RelationMapUpdateMap(Oid relationId, Oid fileNode, bool shared,
00040                      bool immediate);
00041 
00042 extern void RelationMapRemoveMapping(Oid relationId);
00043 
00044 extern void RelationMapInvalidate(bool shared);
00045 extern void RelationMapInvalidateAll(void);
00046 
00047 extern void AtCCI_RelationMap(void);
00048 extern void AtEOXact_RelationMap(bool isCommit);
00049 extern void AtPrepare_RelationMap(void);
00050 
00051 extern void CheckPointRelationMap(void);
00052 
00053 extern void RelationMapFinishBootstrap(void);
00054 
00055 extern void RelationMapInitialize(void);
00056 extern void RelationMapInitializePhase2(void);
00057 extern void RelationMapInitializePhase3(void);
00058 
00059 extern void relmap_redo(XLogRecPtr lsn, XLogRecord *record);
00060 extern void relmap_desc(StringInfo buf, uint8 xl_info, char *rec);
00061 
00062 #endif   /* RELMAPPER_H */