OSDN Git Service

Another pgindent run. Fixes enum indenting, and improves #endif
[pg-rex/syncrep.git] / src / include / utils / relcache.h
1 /*-------------------------------------------------------------------------
2  *
3  * relcache.h
4  *        Relation descriptor cache definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: relcache.h,v 1.28 2001/10/28 06:26:09 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef RELCACHE_H
15 #define RELCACHE_H
16
17 #include "utils/rel.h"
18
19 /*
20  * relation lookup routines
21  */
22 extern Relation RelationIdGetRelation(Oid relationId);
23 extern Relation RelationNameGetRelation(const char *relationName);
24 extern Relation RelationNodeCacheGetRelation(RelFileNode rnode);
25
26 /* finds an existing cache entry, but won't make a new one */
27 extern Relation RelationIdCacheGetRelation(Oid relationId);
28
29 extern void RelationClose(Relation relation);
30
31 /*
32  * Routines to compute/retrieve additional cached information
33  */
34 extern List *RelationGetIndexList(Relation relation);
35
36 extern void RelationInitIndexAccessInfo(Relation relation);
37
38 /*
39  * Routines for backend startup
40  */
41 extern void RelationCacheInitialize(void);
42 extern void RelationCacheInitializePhase2(void);
43
44 /*
45  * Routine to create a relcache entry for an about-to-be-created relation
46  */
47 extern Relation RelationBuildLocalRelation(const char *relname,
48                                                    TupleDesc tupDesc,
49                                                    Oid relid, Oid dbid,
50                                                    bool nailit);
51
52 /*
53  * Routines for flushing/rebuilding relcache entries in various scenarios
54  */
55 extern void RelationForgetRelation(Oid rid);
56
57 extern void RelationIdInvalidateRelationCacheByRelationId(Oid relationId);
58
59 extern void RelationCacheInvalidate(void);
60
61 extern void RelationPurgeLocalRelation(bool xactComitted);
62
63 extern void RelationCacheAbort(void);
64
65
66 /* XLOG support */
67 extern void CreateDummyCaches(void);
68 extern void DestroyDummyCaches(void);
69
70 /*
71  * both vacuum.c and relcache.c need to know the name of the relcache init file
72  */
73
74 #define RELCACHE_INIT_FILENAME  "pg_internal.init"
75
76 #endif   /* RELCACHE_H */