Put external declarations into header files.
This commit is contained in:
parent
040bb787bc
commit
a70e74b060
@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.65 2000/11/16 22:30:15 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.66 2000/11/21 21:15:53 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -25,9 +25,6 @@
|
||||
|
||||
#ifdef XLOG
|
||||
#include "access/xlogutils.h"
|
||||
void gist_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void gist_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void gist_desc(char *buf, uint8 xl_info, char* rec);
|
||||
#endif
|
||||
|
||||
/* non-export function prototypes */
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.44 2000/11/08 22:09:54 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.45 2000/11/21 21:15:54 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@ -29,9 +29,6 @@ bool BuildingHash = false;
|
||||
|
||||
#ifdef XLOG
|
||||
#include "access/xlogutils.h"
|
||||
void hash_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void hash_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void hash_desc(char *buf, uint8 xl_info, char* rec);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.95 2000/11/20 21:14:13 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.96 2000/11/21 21:15:54 petere Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@ -89,10 +89,6 @@
|
||||
#ifdef XLOG
|
||||
#include "access/xlogutils.h"
|
||||
|
||||
void heap_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void heap_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void heap_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
XLogRecPtr log_heap_move(Relation reln, ItemPointerData from, HeapTuple newtup);
|
||||
|
||||
/* comments are in heap_update */
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.70 2000/11/08 22:09:55 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.71 2000/11/21 21:15:55 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -35,9 +35,6 @@ bool FastBuild = true; /* use sort/build instead of insertion
|
||||
#ifdef XLOG
|
||||
#include "access/xlogutils.h"
|
||||
|
||||
void btree_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void btree_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void btree_desc(char *buf, uint8 xl_info, char* rec);
|
||||
#endif
|
||||
|
||||
static void _bt_restscan(IndexScanDesc scan);
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.40 2000/07/25 04:47:59 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.41 2000/11/21 21:15:55 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -18,6 +18,7 @@
|
||||
#include "access/genam.h"
|
||||
#include "access/istrat.h"
|
||||
#include "access/nbtree.h"
|
||||
#include "catalog/catalog.h"
|
||||
#include "executor/execdebug.h"
|
||||
|
||||
|
||||
@ -133,7 +134,6 @@ _bt_formitem(IndexTuple itup)
|
||||
int nbytes_btitem;
|
||||
BTItem btitem;
|
||||
Size tuplen;
|
||||
extern Oid newoid();
|
||||
|
||||
/* make a copy of the index tuple with room for extra stuff */
|
||||
tuplen = IndexTupleSize(itup);
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.55 2000/11/08 22:09:55 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.56 2000/11/21 21:15:55 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -24,9 +24,6 @@
|
||||
|
||||
#ifdef XLOG
|
||||
#include "access/xlogutils.h"
|
||||
void rtree_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void rtree_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void rtree_desc(char *buf, uint8 xl_info, char* rec);
|
||||
#endif
|
||||
|
||||
typedef struct SPLITVEC
|
||||
|
@ -1,38 +1,14 @@
|
||||
#include "postgres.h"
|
||||
#include "access/gist.h"
|
||||
#include "access/hash.h"
|
||||
#include "access/heapam.h"
|
||||
#include "access/nbtree.h"
|
||||
#include "access/rtree.h"
|
||||
#include "access/xact.h"
|
||||
#include "access/xlog.h"
|
||||
#include "storage/smgr.h"
|
||||
|
||||
#ifdef XLOG
|
||||
extern void xlog_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void xlog_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void xlog_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
extern void xact_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void xact_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void xact_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
extern void smgr_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void smgr_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void smgr_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
extern void heap_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void heap_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void heap_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
extern void btree_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void btree_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void btree_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
extern void hash_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void hash_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void hash_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
extern void rtree_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void rtree_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void rtree_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
extern void gist_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void gist_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void gist_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
RmgrData RmgrTable[] = {
|
||||
{"XLOG", xlog_redo, xlog_undo, xlog_desc},
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.36 2000/11/03 11:39:35 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.37 2000/11/21 21:15:57 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains the high level access-method interface to the
|
||||
@ -20,7 +20,9 @@
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/heapam.h"
|
||||
#include "access/transam.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "miscadmin.h"
|
||||
|
||||
static int RecoveryCheckingEnabled(void);
|
||||
static void TransRecover(Relation logRelation);
|
||||
@ -77,17 +79,6 @@ TransactionId FirstTransactionId = (TransactionId) 514;
|
||||
*/
|
||||
int RecoveryCheckingEnableState = 0;
|
||||
|
||||
/* ------------------
|
||||
* spinlock for oid generation
|
||||
* -----------------
|
||||
*/
|
||||
extern int OidGenLockId;
|
||||
|
||||
#ifdef XLOG
|
||||
#include "miscadmin.h"
|
||||
extern VariableCache ShmemVariableCache;
|
||||
#endif
|
||||
|
||||
/* ----------------
|
||||
* recovery checking accessors
|
||||
* ----------------
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.83 2000/11/16 22:30:16 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.84 2000/11/21 21:15:57 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Transaction aborts can now occur two ways:
|
||||
@ -224,10 +224,6 @@ int XactIsoLevel;
|
||||
|
||||
int CommitDelay = 5; /* 1/200 sec */
|
||||
|
||||
void xact_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void xact_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void xact_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
static void (*_RollbackFunc)(void*) = NULL;
|
||||
static void *_RollbackData = NULL;
|
||||
|
||||
|
@ -6,11 +6,13 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.31 2000/11/21 10:17:57 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.32 2000/11/21 21:15:57 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
@ -19,8 +21,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/transam.h"
|
||||
#include "access/xact.h"
|
||||
#include "catalog/catversion.h"
|
||||
#include "storage/sinval.h"
|
||||
@ -29,17 +30,10 @@
|
||||
#include "storage/s_lock.h"
|
||||
#include "access/xlog.h"
|
||||
#include "access/xlogutils.h"
|
||||
#include "utils/relcache.h"
|
||||
|
||||
#include "miscadmin.h"
|
||||
|
||||
void UpdateControlFile(void);
|
||||
int XLOGShmemSize(void);
|
||||
void XLOGShmemInit(void);
|
||||
void BootStrapXLOG(void);
|
||||
void StartupXLOG(void);
|
||||
void ShutdownXLOG(void);
|
||||
void CreateCheckPoint(bool shutdown);
|
||||
|
||||
char XLogDir[MAXPGPATH];
|
||||
char ControlFilePath[MAXPGPATH];
|
||||
int XLOGbuffers = 8;
|
||||
@ -56,8 +50,6 @@ SPINLOCK ControlFileLockId;
|
||||
/* To generate new xid */
|
||||
SPINLOCK XidGenLockId;
|
||||
|
||||
extern VariableCache ShmemVariableCache;
|
||||
|
||||
#define MinXLOGbuffers 4
|
||||
|
||||
typedef struct XLgwrRqst
|
||||
@ -1239,7 +1231,7 @@ UpdateControlFile()
|
||||
}
|
||||
|
||||
int
|
||||
XLOGShmemSize()
|
||||
XLOGShmemSize(void)
|
||||
{
|
||||
if (XLOGbuffers < MinXLOGbuffers)
|
||||
XLOGbuffers = MinXLOGbuffers;
|
||||
@ -1631,8 +1623,6 @@ StartupXLOG()
|
||||
* Postmaster uses it to set ThisStartUpID from XLogCtlData
|
||||
* located in shmem after successful startup.
|
||||
*/
|
||||
void SetThisStartUpID(void);
|
||||
|
||||
void
|
||||
SetThisStartUpID(void)
|
||||
{
|
||||
@ -1645,9 +1635,6 @@ SetThisStartUpID(void)
|
||||
void
|
||||
ShutdownXLOG()
|
||||
{
|
||||
#ifdef XLOG
|
||||
extern void CreateDummyCaches(void);
|
||||
#endif
|
||||
elog(LOG, "Data Base System shutting down at %s", str_time(time(NULL)));
|
||||
|
||||
#ifdef XLOG
|
||||
@ -1829,9 +1816,6 @@ XLogPutNextOid(Oid nextOid)
|
||||
(char *) &nextOid, sizeof(Oid), NULL, 0);
|
||||
}
|
||||
|
||||
void xlog_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void xlog_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void xlog_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
void
|
||||
xlog_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "access/xlogutils.h"
|
||||
#include "catalog/pg_database.h"
|
||||
#include "lib/hasht.h"
|
||||
#include "utils/relcache.h"
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------
|
||||
@ -313,8 +314,6 @@ _xl_new_reldesc(void)
|
||||
return(res);
|
||||
}
|
||||
|
||||
extern void CreateDummyCaches(void);
|
||||
extern void DestroyDummyCaches(void);
|
||||
|
||||
void
|
||||
XLogInitRelationCache(void)
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.32 2000/07/14 22:17:38 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.33 2000/11/21 21:15:59 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -27,6 +27,7 @@
|
||||
#include "access/tupdesc.h"
|
||||
#include "access/xact.h"
|
||||
#include "bootstrap/bootstrap.h"
|
||||
#include "catalog/catalog.h"
|
||||
#include "catalog/heap.h"
|
||||
#include "catalog/pg_am.h"
|
||||
#include "catalog/pg_attribute.h"
|
||||
@ -288,7 +289,7 @@ boot_type_thing:
|
||||
|
||||
optoideq:
|
||||
OBJ_ID EQUALS boot_ident { $$ = atol(LexIDStr($3)); }
|
||||
| { extern Oid newoid(); $$ = newoid(); }
|
||||
| { $$ = newoid(); }
|
||||
;
|
||||
|
||||
boot_tuplelist:
|
||||
|
@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.99 2000/11/21 09:39:57 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.100 2000/11/21 21:15:59 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -27,6 +27,7 @@
|
||||
|
||||
#include "access/genam.h"
|
||||
#include "access/heapam.h"
|
||||
#include "access/xlog.h"
|
||||
#include "bootstrap/bootstrap.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/index.h"
|
||||
@ -39,16 +40,11 @@
|
||||
#include "utils/fmgroids.h"
|
||||
#include "utils/guc.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/relcache.h"
|
||||
|
||||
|
||||
#define ALLOC(t, c) ((t *) calloc((unsigned)(c), sizeof(t)))
|
||||
|
||||
extern void StartupXLOG(void);
|
||||
extern void ShutdownXLOG(void);
|
||||
extern void BootStrapXLOG(void);
|
||||
|
||||
extern char XLogDir[];
|
||||
extern char ControlFilePath[];
|
||||
|
||||
extern int Int_yyparse(void);
|
||||
static hashnode *AddStr(char *str, int strlength, int mderef);
|
||||
@ -223,10 +219,6 @@ BootstrapMain(int argc, char *argv[])
|
||||
int xlogop = BS_XLOG_NOP;
|
||||
char *potential_DataDir = NULL;
|
||||
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
|
||||
/* --------------------
|
||||
* initialize globals
|
||||
* -------------------
|
||||
@ -355,7 +347,6 @@ BootstrapMain(int argc, char *argv[])
|
||||
{
|
||||
if (xlogop == BS_XLOG_CHECKPOINT)
|
||||
{
|
||||
extern void CreateDummyCaches(void);
|
||||
CreateDummyCaches();
|
||||
CreateCheckPoint(false);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.71 2000/11/16 22:30:18 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.72 2000/11/21 21:15:59 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -88,6 +88,7 @@
|
||||
#include "libpq/pqformat.h"
|
||||
#include "miscadmin.h"
|
||||
#include "tcop/dest.h"
|
||||
#include "tcop/tcopprot.h"
|
||||
#include "utils/fmgroids.h"
|
||||
#include "utils/ps_status.h"
|
||||
#include "utils/syscache.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geqo_misc.c,v 1.28 2000/02/15 20:49:14 tgl Exp $
|
||||
* $Id: geqo_misc.c,v 1.29 2000/11/21 21:16:00 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -128,7 +128,6 @@ void
|
||||
geqo_print_joinclauses(Query *root, List *clauses)
|
||||
{
|
||||
List *l;
|
||||
extern void print_expr(Node *expr, List *rtable); /* in print.c */
|
||||
|
||||
foreach(l, clauses)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.188 2000/11/15 18:36:04 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.189 2000/11/21 21:16:00 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@ -216,10 +216,6 @@ extern char *optarg;
|
||||
extern int optind,
|
||||
opterr;
|
||||
|
||||
extern char XLogDir[];
|
||||
extern char ControlFilePath[];
|
||||
extern void SetThisStartUpID(void);
|
||||
|
||||
/*
|
||||
* postmaster.c - function prototypes
|
||||
*/
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.52 2000/10/07 14:39:12 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.53 2000/11/21 21:16:01 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@ -416,7 +416,6 @@ static int IpcSemaphoreLock_return;
|
||||
void
|
||||
IpcSemaphoreLock(IpcSemaphoreId semId, int sem, int lock)
|
||||
{
|
||||
extern int errno;
|
||||
int errStatus;
|
||||
struct sembuf sops;
|
||||
|
||||
@ -460,7 +459,6 @@ static int IpcSemaphoreUnlock_return;
|
||||
void
|
||||
IpcSemaphoreUnlock(IpcSemaphoreId semId, int sem, int lock)
|
||||
{
|
||||
extern int errno;
|
||||
int errStatus;
|
||||
struct sembuf sops;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.33 2000/04/12 17:15:37 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.34 2000/11/21 21:16:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -17,6 +17,7 @@
|
||||
#include "postgres.h"
|
||||
|
||||
#include "miscadmin.h"
|
||||
#include "access/xlog.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "storage/sinval.h"
|
||||
|
||||
@ -55,8 +56,6 @@ void
|
||||
CreateSharedMemoryAndSemaphores(IPCKey key, int maxBackends)
|
||||
{
|
||||
int size;
|
||||
extern int XLOGShmemSize(void);
|
||||
extern void XLOGShmemInit(void);
|
||||
|
||||
#ifdef HAS_TEST_AND_SET
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.53 2000/07/25 20:17:02 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.54 2000/11/21 21:16:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -60,6 +60,7 @@
|
||||
*/
|
||||
|
||||
#include "postgres.h"
|
||||
#include "access/transam.h"
|
||||
#include "utils/tqual.h"
|
||||
|
||||
/* shared memory global variables */
|
||||
@ -68,8 +69,6 @@ unsigned long ShmemBase = 0; /* start and end address of shared memory */
|
||||
static unsigned long ShmemEnd = 0;
|
||||
static unsigned long ShmemSize = 0; /* current size (and default) */
|
||||
|
||||
extern VariableCache ShmemVariableCache; /* varsup.c */
|
||||
|
||||
SPINLOCK ShmemLock; /* lock for shared memory allocation */
|
||||
|
||||
SPINLOCK ShmemIndexLock; /* lock for shmem index access */
|
||||
|
@ -11,11 +11,12 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.20 2000/11/08 22:10:00 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.21 2000/11/21 21:16:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
#include "miscadmin.h"
|
||||
|
||||
#ifdef STABLE_MEMORY_STORAGE
|
||||
|
||||
@ -71,7 +72,6 @@ typedef struct MMRelHashEntry
|
||||
#define MMNRELATIONS 2
|
||||
|
||||
SPINLOCK MMCacheLock;
|
||||
extern Oid MyDatabaseId;
|
||||
|
||||
static int *MMCurTop;
|
||||
static int *MMCurRelno;
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.44 2000/11/13 09:06:36 inoue Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.45 2000/11/21 21:16:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -579,11 +579,6 @@ smgriswo(int16 smgrno)
|
||||
#endif
|
||||
|
||||
#ifdef XLOG
|
||||
#include "access/xlog.h"
|
||||
|
||||
void smgr_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void smgr_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
void smgr_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
void
|
||||
smgr_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.188 2000/11/14 18:11:32 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.189 2000/11/21 21:16:02 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@ -37,6 +37,7 @@
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#include "access/xlog.h"
|
||||
#include "commands/async.h"
|
||||
#include "commands/trigger.h"
|
||||
#include "commands/variable.h"
|
||||
@ -71,8 +72,11 @@
|
||||
* ----------------
|
||||
*/
|
||||
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
/*
|
||||
* XXX For ps display. That stuff needs to be cleaned up.
|
||||
* for ps display
|
||||
*/
|
||||
bool HostnameLookup;
|
||||
bool ShowPortNumber;
|
||||
@ -82,14 +86,8 @@ bool Log_connections = false;
|
||||
CommandDest whereToSendOutput = Debug;
|
||||
|
||||
|
||||
extern void StartupXLOG(void);
|
||||
extern void ShutdownXLOG(void);
|
||||
|
||||
extern void HandleDeadLock(SIGNAL_ARGS);
|
||||
|
||||
extern char XLogDir[];
|
||||
extern char ControlFilePath[];
|
||||
|
||||
static bool dontExecute = false;
|
||||
|
||||
/* note: these declarations had better match tcopprot.h */
|
||||
@ -1064,10 +1062,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
||||
|
||||
char *potential_DataDir = NULL;
|
||||
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
extern int DebugLvl;
|
||||
|
||||
/*
|
||||
* Fire up essential subsystems: error and memory management
|
||||
*
|
||||
@ -1649,7 +1643,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
|
||||
if (!IsUnderPostmaster)
|
||||
{
|
||||
puts("\nPOSTGRES backend interactive interface ");
|
||||
puts("$Revision: 1.188 $ $Date: 2000/11/14 18:11:32 $\n");
|
||||
puts("$Revision: 1.189 $ $Date: 2000/11/21 21:16:02 $\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.69 2000/07/29 03:26:42 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.70 2000/11/21 21:16:02 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -26,12 +26,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CYR_RECODE
|
||||
/* XXX no points for style --- this is actually in utils/init/miscinit.c */
|
||||
extern char *convertstr(char *, int, int);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* CHAR() and VARCHAR() types are part of the ANSI SQL standard. CHAR()
|
||||
* is for blank-padded string whose length is specified in CREATE TABLE.
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.18 2000/05/31 00:28:31 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.19 2000/11/21 21:16:03 petere Exp $
|
||||
*
|
||||
* NOTE
|
||||
* This should eventually work with elog(), dlog(), etc.
|
||||
@ -29,9 +29,6 @@ ExceptionalCondition(char *conditionName,
|
||||
char *fileName,
|
||||
int lineNumber)
|
||||
{
|
||||
extern char *ExcFileName; /* XXX */
|
||||
extern Index ExcLineNumber; /* XXX */
|
||||
|
||||
ExcFileName = fileName;
|
||||
ExcLineNumber = lineNumber;
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "access/itup.h"
|
||||
#include "access/relscan.h"
|
||||
#include "access/sdir.h"
|
||||
#include "access/xlog.h"
|
||||
|
||||
/*
|
||||
** You can have as many strategies as you please in GiSTs, as
|
||||
@ -191,6 +192,10 @@ extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
|
||||
Relation r, Page pg, OffsetNumber o, int b, bool l);
|
||||
extern StrategyNumber RelationGetGISTStrategy(Relation, AttrNumber, RegProcedure);
|
||||
|
||||
extern void gist_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void gist_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void gist_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
/* gistget.c */
|
||||
extern Datum gistgettuple(PG_FUNCTION_ARGS);
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: hash.h,v 1.35 2000/07/14 22:17:53 tgl Exp $
|
||||
* $Id: hash.h,v 1.36 2000/11/21 21:16:05 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* modeled after Margo Seltzer's hash implementation for unix.
|
||||
@ -20,6 +20,7 @@
|
||||
#include "access/itup.h"
|
||||
#include "access/relscan.h"
|
||||
#include "access/sdir.h"
|
||||
#include "access/xlog.h"
|
||||
#include "fmgr.h"
|
||||
|
||||
/*
|
||||
@ -330,4 +331,10 @@ extern Bucket _hash_call(Relation rel, HashMetaPage metap, Datum key);
|
||||
extern uint32 _hash_log2(uint32 num);
|
||||
extern void _hash_checkpage(Page page, int flags);
|
||||
|
||||
|
||||
/* hash.c */
|
||||
extern void hash_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void hash_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void hash_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
#endif /* HASH_H */
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: heapam.h,v 1.57 2000/11/14 21:04:32 tgl Exp $
|
||||
* $Id: heapam.h,v 1.58 2000/11/21 21:16:05 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -18,6 +18,7 @@
|
||||
#include "access/htup.h"
|
||||
#include "access/relscan.h"
|
||||
#include "access/tupmacs.h"
|
||||
#include "access/xlogutils.h"
|
||||
#include "storage/block.h"
|
||||
#include "storage/lmgr.h"
|
||||
#include "utils/rel.h"
|
||||
@ -234,6 +235,10 @@ extern int heap_mark4update(Relation relation, HeapTuple tup, Buffer *userbuf);
|
||||
extern void heap_markpos(HeapScanDesc scan);
|
||||
extern void heap_restrpos(HeapScanDesc scan);
|
||||
|
||||
extern void heap_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void heap_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
extern void heap_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
/* in common/heaptuple.c */
|
||||
extern Size ComputeDataSize(TupleDesc tupleDesc, Datum *value, char *nulls);
|
||||
extern void DataFill(char *data, TupleDesc tupleDesc,
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: nbtree.h,v 1.46 2000/10/21 15:43:33 vadim Exp $
|
||||
* $Id: nbtree.h,v 1.47 2000/11/21 21:16:05 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -17,6 +17,7 @@
|
||||
#include "access/itup.h"
|
||||
#include "access/relscan.h"
|
||||
#include "access/sdir.h"
|
||||
#include "access/xlogutils.h"
|
||||
|
||||
/*
|
||||
* BTPageOpaqueData -- At the end of every page, we store a pointer
|
||||
@ -332,6 +333,10 @@ extern Datum btmarkpos(PG_FUNCTION_ARGS);
|
||||
extern Datum btrestrpos(PG_FUNCTION_ARGS);
|
||||
extern Datum btdelete(PG_FUNCTION_ARGS);
|
||||
|
||||
extern void btree_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void btree_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void btree_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
/*
|
||||
* prototypes for functions in nbtinsert.c
|
||||
*/
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: rtree.h,v 1.19 2000/06/15 03:32:31 momjian Exp $
|
||||
* $Id: rtree.h,v 1.20 2000/11/21 21:16:05 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -17,6 +17,7 @@
|
||||
#include "access/itup.h"
|
||||
#include "access/sdir.h"
|
||||
#include "access/skey.h"
|
||||
#include "access/xlog.h"
|
||||
#include "utils/rel.h"
|
||||
|
||||
/* see rtstrat.c for what all this is about */
|
||||
@ -121,6 +122,10 @@ extern Datum rtrescan(PG_FUNCTION_ARGS);
|
||||
extern Datum rtbuild(PG_FUNCTION_ARGS);
|
||||
extern void _rtdump(Relation r);
|
||||
|
||||
extern void rtree_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void rtree_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void rtree_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
/* rtscan.c */
|
||||
extern void rtadjscans(Relation r, int op, BlockNumber blkno,
|
||||
OffsetNumber offnum);
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: transam.h,v 1.26 2000/11/03 11:39:36 vadim Exp $
|
||||
* $Id: transam.h,v 1.27 2000/11/21 21:16:05 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Transaction System Version 101 now support proper oid
|
||||
@ -200,5 +200,6 @@ extern bool AMI_OVERRIDE;
|
||||
|
||||
/* in varsup.c */
|
||||
extern int OidGenLockId;
|
||||
extern VariableCache ShmemVariableCache;
|
||||
|
||||
#endif /* TRAMSAM_H */
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: xact.h,v 1.29 2000/10/28 16:20:59 vadim Exp $
|
||||
* $Id: xact.h,v 1.30 2000/11/21 21:16:05 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -15,6 +15,7 @@
|
||||
#define XACT_H
|
||||
|
||||
#include "access/transam.h"
|
||||
#include "access/xlog.h"
|
||||
#include "utils/nabstime.h"
|
||||
|
||||
/*
|
||||
@ -142,6 +143,10 @@ extern TransactionId DisabledTransactionId;
|
||||
extern void XactPushRollback(void (*func) (void *), void* data);
|
||||
extern void XactPopRollback(void);
|
||||
|
||||
extern void xact_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void xact_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void xact_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
/* defined in xid.c */
|
||||
extern Datum xidin(PG_FUNCTION_ARGS);
|
||||
extern Datum xidout(PG_FUNCTION_ARGS);
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* xlog.h
|
||||
*
|
||||
* Postgres transaction log manager
|
||||
* PostgreSQL transaction log manager
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/include/access/xlog.h,v 1.10 2000/11/21 21:16:05 petere Exp $
|
||||
*/
|
||||
#ifndef XLOG_H
|
||||
#define XLOG_H
|
||||
@ -11,6 +11,7 @@
|
||||
#include "access/rmgr.h"
|
||||
#include "access/transam.h"
|
||||
#include "access/xlogdefs.h"
|
||||
#include "access/xlogutils.h"
|
||||
|
||||
typedef struct XLogRecord
|
||||
{
|
||||
@ -99,4 +100,20 @@ extern void XLogFlush(XLogRecPtr RecPtr);
|
||||
|
||||
extern void CreateCheckPoint(bool shutdown);
|
||||
|
||||
extern void xlog_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void xlog_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void xlog_desc(char *buf, uint8 xl_info, char* rec);
|
||||
|
||||
extern void UpdateControlFile(void);
|
||||
extern int XLOGShmemSize(void);
|
||||
extern void XLOGShmemInit(void);
|
||||
extern void BootStrapXLOG(void);
|
||||
extern void StartupXLOG(void);
|
||||
extern void ShutdownXLOG(void);
|
||||
extern void CreateCheckPoint(bool shutdown);
|
||||
extern void SetThisStartUpID(void);
|
||||
|
||||
extern char XLogDir[];
|
||||
extern char ControlFilePath[];
|
||||
|
||||
#endif /* XLOG_H */
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#ifndef XLOG_UTILS_H
|
||||
|
||||
#include "access/rmgr.h"
|
||||
#include "utils/rel.h"
|
||||
|
||||
extern int XLogIsOwnerOfTuple(RelFileNode hnode, ItemPointer iptr,
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: miscadmin.h,v 1.71 2000/11/14 01:15:03 momjian Exp $
|
||||
* $Id: miscadmin.h,v 1.72 2000/11/21 21:16:04 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the information in this file will be moved to
|
||||
@ -141,6 +141,10 @@ extern void SetDataDir(const char *dir);
|
||||
extern int FindExec(char *full_path, const char *argv0, const char *binary_name);
|
||||
extern int CheckPathAccess(char *path, char *name, int open_mode);
|
||||
|
||||
#ifdef CYR_RECODE
|
||||
extern char *convertstr(char *, int, int);
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* pmod.h -- *
|
||||
* POSTGRES processing mode definitions. *
|
||||
|
@ -7,13 +7,14 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: smgr.h,v 1.24 2000/11/08 22:10:02 tgl Exp $
|
||||
* $Id: smgr.h,v 1.25 2000/11/21 21:16:05 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef SMGR_H
|
||||
#define SMGR_H
|
||||
|
||||
#include "access/xlog.h"
|
||||
#include "storage/relfilenode.h"
|
||||
#include "storage/block.h"
|
||||
#include "storage/spin.h"
|
||||
@ -49,6 +50,10 @@ extern int smgrabort(void);
|
||||
|
||||
#ifdef XLOG
|
||||
extern int smgrsync(void);
|
||||
|
||||
extern void smgr_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void smgr_undo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void smgr_desc(char *buf, uint8 xl_info, char* rec);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: relcache.h,v 1.22 2000/10/23 04:10:24 vadim Exp $
|
||||
* $Id: relcache.h,v 1.23 2000/11/21 21:16:06 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -52,6 +52,10 @@ extern void RelationPurgeLocalRelation(bool xactComitted);
|
||||
|
||||
extern void RelationCacheAbort(void);
|
||||
|
||||
|
||||
extern void CreateDummyCaches(void);
|
||||
extern void DestroyDummyCaches(void);
|
||||
|
||||
/*
|
||||
* both vacuum.c and relcache.c need to know the name of the relcache init file
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user