1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* relcache.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* Relation descriptor cache definitions.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
2001-01-24 20:43:33 +01:00
|
|
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2001-10-28 07:26:15 +01:00
|
|
|
* $Id: relcache.h,v 1.28 2001/10/28 06:26:09 momjian Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef RELCACHE_H
|
1996-08-28 03:59:28 +02:00
|
|
|
#define RELCACHE_H
|
|
|
|
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "utils/rel.h"
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* relation lookup routines
|
|
|
|
*/
|
|
|
|
extern Relation RelationIdGetRelation(Oid relationId);
|
2000-01-22 15:20:56 +01:00
|
|
|
extern Relation RelationNameGetRelation(const char *relationName);
|
2000-10-23 06:10:24 +02:00
|
|
|
extern Relation RelationNodeCacheGetRelation(RelFileNode rnode);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2000-06-17 23:49:04 +02:00
|
|
|
/* finds an existing cache entry, but won't make a new one */
|
|
|
|
extern Relation RelationIdCacheGetRelation(Oid relationId);
|
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void RelationClose(Relation relation);
|
1999-10-04 01:55:40 +02:00
|
|
|
|
2000-06-17 23:49:04 +02:00
|
|
|
/*
|
|
|
|
* Routines to compute/retrieve additional cached information
|
|
|
|
*/
|
|
|
|
extern List *RelationGetIndexList(Relation relation);
|
|
|
|
|
2001-10-07 01:21:45 +02:00
|
|
|
extern void RelationInitIndexAccessInfo(Relation relation);
|
|
|
|
|
2000-08-06 06:40:08 +02:00
|
|
|
/*
|
|
|
|
* Routines for backend startup
|
|
|
|
*/
|
|
|
|
extern void RelationCacheInitialize(void);
|
|
|
|
extern void RelationCacheInitializePhase2(void);
|
|
|
|
|
2001-06-29 23:08:25 +02:00
|
|
|
/*
|
|
|
|
* Routine to create a relcache entry for an about-to-be-created relation
|
|
|
|
*/
|
|
|
|
extern Relation RelationBuildLocalRelation(const char *relname,
|
2001-10-25 07:50:21 +02:00
|
|
|
TupleDesc tupDesc,
|
|
|
|
Oid relid, Oid dbid,
|
|
|
|
bool nailit);
|
2001-06-29 23:08:25 +02:00
|
|
|
|
1999-10-04 01:55:40 +02:00
|
|
|
/*
|
|
|
|
* Routines for flushing/rebuilding relcache entries in various scenarios
|
|
|
|
*/
|
2001-06-29 23:08:25 +02:00
|
|
|
extern void RelationForgetRelation(Oid rid);
|
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void RelationIdInvalidateRelationCacheByRelationId(Oid relationId);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2000-01-31 05:35:57 +01:00
|
|
|
extern void RelationCacheInvalidate(void);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void RelationPurgeLocalRelation(bool xactComitted);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1999-09-04 20:42:15 +02:00
|
|
|
extern void RelationCacheAbort(void);
|
|
|
|
|
2000-11-21 22:16:06 +01:00
|
|
|
|
2001-10-07 01:21:45 +02:00
|
|
|
/* XLOG support */
|
2000-11-21 22:16:06 +01:00
|
|
|
extern void CreateDummyCaches(void);
|
|
|
|
extern void DestroyDummyCaches(void);
|
|
|
|
|
1999-05-01 21:09:46 +02:00
|
|
|
/*
|
|
|
|
* both vacuum.c and relcache.c need to know the name of the relcache init file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define RELCACHE_INIT_FILENAME "pg_internal.init"
|
2001-10-28 07:26:15 +01:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* RELCACHE_H */
|