6
6
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.31 2000/11/2110:17 :57vadim Exp $
9
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.32 2000/11/2121:15 :57petere Exp $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
13
13
14
+ #include "postgres.h"
15
+
14
16
#include <fcntl.h>
15
17
#include <unistd.h>
16
18
#include <errno.h>
19
21
#include <sys/types.h>
20
22
#include <dirent.h>
21
23
22
- #include "postgres.h"
23
-
24
+ #include "access/transam.h"
24
25
#include "access/xact.h"
25
26
#include "catalog/catversion.h"
26
27
#include "storage/sinval.h"
29
30
#include "storage/s_lock.h"
30
31
#include "access/xlog.h"
31
32
#include "access/xlogutils.h"
33
+ #include "utils/relcache.h"
32
34
33
35
#include "miscadmin.h"
34
36
35
- void UpdateControlFile (void );
36
- int XLOGShmemSize (void );
37
- void XLOGShmemInit (void );
38
- void BootStrapXLOG (void );
39
- void StartupXLOG (void );
40
- void ShutdownXLOG (void );
41
- void CreateCheckPoint (bool shutdown );
42
-
43
37
char XLogDir [MAXPGPATH ];
44
38
char ControlFilePath [MAXPGPATH ];
45
39
int XLOGbuffers = 8 ;
@@ -56,8 +50,6 @@ SPINLOCKControlFileLockId;
56
50
/* To generate new xid */
57
51
SPINLOCK XidGenLockId ;
58
52
59
- extern VariableCache ShmemVariableCache ;
60
-
61
53
#define MinXLOGbuffers 4
62
54
63
55
typedef struct XLgwrRqst
@@ -1239,7 +1231,7 @@ UpdateControlFile()
1239
1231
}
1240
1232
1241
1233
int
1242
- XLOGShmemSize ()
1234
+ XLOGShmemSize (void )
1243
1235
{
1244
1236
if (XLOGbuffers < MinXLOGbuffers )
1245
1237
XLOGbuffers = MinXLOGbuffers ;
@@ -1631,8 +1623,6 @@ StartupXLOG()
1631
1623
* Postmaster uses it to set ThisStartUpID from XLogCtlData
1632
1624
* located in shmem after successful startup.
1633
1625
*/
1634
- void SetThisStartUpID (void );
1635
-
1636
1626
void
1637
1627
SetThisStartUpID (void )
1638
1628
{
@@ -1645,9 +1635,6 @@ SetThisStartUpID(void)
1645
1635
void
1646
1636
ShutdownXLOG ()
1647
1637
{
1648
- #ifdef XLOG
1649
- extern void CreateDummyCaches (void );
1650
- #endif
1651
1638
elog (LOG ,"Data Base System shutting down at %s" ,str_time (time (NULL )));
1652
1639
1653
1640
#ifdef XLOG
@@ -1829,9 +1816,6 @@ XLogPutNextOid(Oid nextOid)
1829
1816
(char * )& nextOid ,sizeof (Oid ),NULL ,0 );
1830
1817
}
1831
1818
1832
- void xlog_redo (XLogRecPtr lsn ,XLogRecord * record );
1833
- void xlog_undo (XLogRecPtr lsn ,XLogRecord * record );
1834
- void xlog_desc (char * buf ,uint8 xl_info ,char * rec );
1835
1819
1836
1820
void
1837
1821
xlog_redo (XLogRecPtr lsn ,XLogRecord * record )