]> granicus.if.org Git - postgresql/commitdiff
Put external declarations into header files.
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 21 Nov 2000 21:16:06 +0000 (21:16 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 21 Nov 2000 21:16:06 +0000 (21:16 +0000)
36 files changed:
src/backend/access/gist/gist.c
src/backend/access/hash/hash.c
src/backend/access/heap/heapam.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/rtree/rtree.c
src/backend/access/transam/rmgr.c
src/backend/access/transam/transam.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogutils.c
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootstrap.c
src/backend/commands/async.c
src/backend/optimizer/geqo/geqo_misc.c
src/backend/postmaster/postmaster.c
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/ipci.c
src/backend/storage/ipc/shmem.c
src/backend/storage/smgr/mm.c
src/backend/storage/smgr/smgr.c
src/backend/tcop/postgres.c
src/backend/utils/adt/varchar.c
src/backend/utils/error/assert.c
src/include/access/gist.h
src/include/access/hash.h
src/include/access/heapam.h
src/include/access/nbtree.h
src/include/access/rtree.h
src/include/access/transam.h
src/include/access/xact.h
src/include/access/xlog.h
src/include/access/xlogutils.h
src/include/miscadmin.h
src/include/storage/smgr.h
src/include/utils/relcache.h

index d8e9005e93375486f9244e40e2b72301bcc203f2..ce1b067d52b2ed508ecc03544793118e3c758d8e 100644 (file)
@@ -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 */
index 333199a898e94a8a4a3ed08f1ce2c6c860746dd3..599696ba8388f261991fe3dd3e826c24dd4161fb 100644 (file)
@@ -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
 
 
index 2607c1c8e5aab77d7bdada7cb380cab420fcc6e1..f636c7fdafe2b200dde82dfd677c00dcaa06fc02 100644 (file)
@@ -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
 #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 */
index ab942844afdeee5b75babcde5fb1858ea9303178..37d898d97eb1b71bd7080c2e024eb04569a7f162 100644 (file)
@@ -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);
index 7bf527dd44fa1e0587c4c9e5d69f9c73d02538dc..77c384e937f86513b79cd9867ec46c587b140498 100644 (file)
@@ -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);
index ee5f621c0c34921fffcabfac4a1ab6b2142dbe37..7104a53b706f69ba90004e043ddc2152d8dcdb25 100644 (file)
@@ -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
index 5a1b250b82462fe6f33197e32925afcb02e4e572..31a9a1a39d7193dc054f59df917f95d23f803685 100644 (file)
@@ -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},
index b56dcd0c50fe073d772f1282bee38feda858dc42..72d5c23628b808e41a56e98cff6b81e23831d84c 100644 (file)
@@ -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
  * ----------------
index 600e9ddcaec0d67a6e203c84b7f04c2241bde993..f1d264f130d43b92d9aadc4322d04064167becca 100644 (file)
@@ -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;
 
index e39c29920f6342fdf4749f65db33176076f1741b..93244a4d5fbdbf4f10bc19a8e34a0e940e4053be 100644 (file)
@@ -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"
 #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)
index dd6ca09acfff5d161f1f090cd4318525ae90dadb..ab085875b5e7508f55639e7e8448d8a69100c964 100644 (file)
@@ -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)
index cf3cd1b280bd2be208766f5361d53b456b54ef22..d0b0c0c5a8c7d2363f5fc3222f6a352755a2574e 100644 (file)
@@ -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:
index fe3ca265e9f48988b33b73d8a0ed2f3e32673e20..2c03e5e1359f40977aee27a11e3f815f12ef8bec 100644 (file)
@@ -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"
 #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);
                }
index 77f7776f6d9220b97ee870776d45ad70a1f73512..e364d53b9df0e14a9893a046e10864b8a41811b8 100644 (file)
@@ -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"
index 01ced310e1b48d4dc9e2c8865670224cb5590b59..54f7e8a0431ed9c4e108876835b548d16753110e 100644 (file)
@@ -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)
        {
index ba81edbb642d20568ded45bb43c9552960c89d18..817ddfbcbec427b3f165a12645e039a67c4c988f 100644 (file)
@@ -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
  */
index 2ea5ccfeda02e9e3a1ba5a95513819d390f53781..98d90bc62e02eeadbefc0ad6d7ce077efddf541b 100644 (file)
@@ -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;
 
index 12594484ece5d669f2ac16206d5bc1202310037c..5c7e88af73e42d1069b27a163e469a9c62e6c5d7 100644 (file)
@@ -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
 
index 0fa6c54256a043aea9a7a21a32435e2a0e12ec35..c5048a389b1ade3bb88cc2ad0d7e9908349e428a 100644 (file)
@@ -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 */
index d64aeb6a4181d27c614faadeeaf26376adf67897..4d676bd193754bad892f1d26a7979905f62309cf 100644 (file)
  *
  *
  * 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;
index 32712d96fee71bd5a06028be13219bc988be43d4..31929d1d3428279dbb1c09de2b64ef2917082b88 100644 (file)
@@ -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)
index 72eea36b5aec5e98353505d1de9f1ce88a3527f9..86d80660d953dac898944b7a2f20ccf4372e0118 100644 (file)
@@ -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"
  * ----------------
  */
 
+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");
        }
 
        /*
index 804ab8c5caa556176b1e6098431266e106a9fc7f..9d6f9d087504293d1f6548c14789b5794873a3fe 100644 (file)
@@ -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 $
  *
  *-------------------------------------------------------------------------
  */
 #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.
index 70537f5d22f39075f2d7aa44b470a1493934a464..1696dd9573af5cc18ba84572980c7a3bbbf37c84 100644 (file)
@@ -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;
 
index 1297b02ff019c7e25fc08ce8916a78a4224c699e..c033d4c3d08a534cc60c48c31f972fd27fefd257 100644 (file)
@@ -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);
 
index 17d3496dee084c90a18ff74210dcf15d5c12b584..de74ca4f92be6e3906558f26c59a07901f10e024 100644 (file)
@@ -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 */
index b325b1b2d1c1b04d7fa201c5b3914dec93d7e37a..de4f29348535d14d481bf15d720bbd936aa2037c 100644 (file)
@@ -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,
index 23a9c9587cbf3b583645f506cbf5e8d9ce9203ab..830fc657317a1b761cdedef120f352b768d3bc7c 100644 (file)
@@ -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
  */
index 70ab1526dc00ec942c2d2dd6d85fd3294f94b21f..50879ce841e63d9a7fad6f661f3bfede70f84fbb 100644 (file)
@@ -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);
index 86fed998a4ce848ec21f0dd0a05f47859f38f711..f1238d5c266896ab9f5bf494addecdc80787ff8b 100644 (file)
@@ -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 */
index 18ca96f3d837758a0317b962c385a038b4fbd381..5aab06e1159cc76940bf80877c2083f87e0f00c4 100644 (file)
@@ -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);
index ec7215b6ae96ee2d6ddf8d544e84b666d17d52b6..493a0e9091ba04f8f5a687f88bb2c3527e990dd8 100644 (file)
@@ -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 */
index b8fa3549f42991a1f26b305a90436dd2cd14dc8f..ab5caccf3228efe4eb68af8d67445972c4c91b74 100644 (file)
@@ -1,6 +1,7 @@
 
 #ifndef XLOG_UTILS_H
 
+#include "access/rmgr.h"
 #include "utils/rel.h"
 
 extern int XLogIsOwnerOfTuple(RelFileNode hnode, ItemPointer iptr, 
index afa88a77434647db4e7f11850a562dbe20f6e682..6cb0fc94449f24c93afc190ae16742eb53b1d7ed 100644 (file)
@@ -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.                                                    *
index 99eed75fe61b9db239ce275161d66ad99a8654bf..7205d5fb7b61305d2cf4364807f9ce41d30581e2 100644 (file)
@@ -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
 
 
index fc15ed5b19c037beadbbb263060a2178f0d30079..181f70819a5c2e4653725031556015e927bfaa02 100644 (file)
@@ -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
  */