diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-20 23:26:37 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-20 23:26:37 +0000 |
commit | 0007490e0964d194a606ba79bb11ae1642da3372 (patch) | |
tree | 91db8ec49d812ba2c4307fcf858dfb7fd3890819 /src/include | |
parent | 2299ceab1cc5e141431f19eaf70c30f0d84eb28b (diff) | |
download | postgresql-0007490e0964d194a606ba79bb11ae1642da3372.tar.gz postgresql-0007490e0964d194a606ba79bb11ae1642da3372.zip |
Convert the arithmetic for shared memory size calculation from 'int'
to 'Size' (that is, size_t), and install overflow detection checks in it.
This allows us to remove the former arbitrary restrictions on NBuffers
etc. It won't make any difference in a 32-bit machine, but in a 64-bit
machine you could theoretically have terabytes of shared buffers.
(How efficiently we could manage 'em remains to be seen.) Similarly,
num_temp_buffers, work_mem, and maintenance_work_mem can be set above
2Gb on a 64-bit machine. Original patch from Koichi Suzuki, additional
work by moi.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/clog.h | 4 | ||||
-rw-r--r-- | src/include/access/multixact.h | 4 | ||||
-rw-r--r-- | src/include/access/slru.h | 4 | ||||
-rw-r--r-- | src/include/access/subtrans.h | 4 | ||||
-rw-r--r-- | src/include/access/twophase.h | 4 | ||||
-rw-r--r-- | src/include/access/xlog.h | 4 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/include/postmaster/bgwriter.h | 4 | ||||
-rw-r--r-- | src/include/postmaster/postmaster.h | 4 | ||||
-rw-r--r-- | src/include/storage/buf_internals.h | 6 | ||||
-rw-r--r-- | src/include/storage/bufmgr.h | 4 | ||||
-rw-r--r-- | src/include/storage/freespace.h | 4 | ||||
-rw-r--r-- | src/include/storage/lock.h | 4 | ||||
-rw-r--r-- | src/include/storage/lwlock.h | 4 | ||||
-rw-r--r-- | src/include/storage/pg_shmem.h | 10 | ||||
-rw-r--r-- | src/include/storage/proc.h | 4 | ||||
-rw-r--r-- | src/include/storage/procarray.h | 4 | ||||
-rw-r--r-- | src/include/storage/shmem.h | 5 | ||||
-rw-r--r-- | src/include/storage/sinval.h | 6 | ||||
-rw-r--r-- | src/include/storage/sinvaladt.h | 4 | ||||
-rw-r--r-- | src/include/utils/hsearch.h | 4 |
21 files changed, 49 insertions, 45 deletions
diff --git a/src/include/access/clog.h b/src/include/access/clog.h index d03c5904f21..f04eb02a58d 100644 --- a/src/include/access/clog.h +++ b/src/include/access/clog.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/clog.h,v 1.13 2005/06/06 17:01:24 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/clog.h,v 1.14 2005/08/20 23:26:29 tgl Exp $ */ #ifndef CLOG_H #define CLOG_H @@ -31,7 +31,7 @@ typedef int XidStatus; extern void TransactionIdSetStatus(TransactionId xid, XidStatus status); extern XidStatus TransactionIdGetStatus(TransactionId xid); -extern int CLOGShmemSize(void); +extern Size CLOGShmemSize(void); extern void CLOGShmemInit(void); extern void BootStrapCLOG(void); extern void StartupCLOG(void); diff --git a/src/include/access/multixact.h b/src/include/access/multixact.h index 29cd44a76d5..229f149406e 100644 --- a/src/include/access/multixact.h +++ b/src/include/access/multixact.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/multixact.h,v 1.5 2005/08/20 01:29:16 ishii Exp $ + * $PostgreSQL: pgsql/src/include/access/multixact.h,v 1.6 2005/08/20 23:26:29 tgl Exp $ */ #ifndef MULTIXACT_H #define MULTIXACT_H @@ -48,7 +48,7 @@ extern int GetMultiXactIdMembers(MultiXactId multi, TransactionId **xids); extern void AtEOXact_MultiXact(void); -extern int MultiXactShmemSize(void); +extern Size MultiXactShmemSize(void); extern void MultiXactShmemInit(void); extern void BootStrapMultiXact(void); extern void StartupMultiXact(void); diff --git a/src/include/access/slru.h b/src/include/access/slru.h index 602e2e3c1f2..63e828a9563 100644 --- a/src/include/access/slru.h +++ b/src/include/access/slru.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/slru.h,v 1.12 2005/07/04 04:51:52 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/slru.h,v 1.13 2005/08/20 23:26:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -96,7 +96,7 @@ typedef SlruCtlData *SlruCtl; typedef struct SlruFlushData *SlruFlush; -extern int SimpleLruShmemSize(void); +extern Size SimpleLruShmemSize(void); extern void SimpleLruInit(SlruCtl ctl, const char *name, LWLockId ctllock, const char *subdir); extern int SimpleLruZeroPage(SlruCtl ctl, int pageno); diff --git a/src/include/access/subtrans.h b/src/include/access/subtrans.h index 2810e438d54..cdd16e90cbd 100644 --- a/src/include/access/subtrans.h +++ b/src/include/access/subtrans.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/subtrans.h,v 1.6 2005/06/17 22:32:48 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/subtrans.h,v 1.7 2005/08/20 23:26:29 tgl Exp $ */ #ifndef SUBTRANS_H #define SUBTRANS_H @@ -15,7 +15,7 @@ extern void SubTransSetParent(TransactionId xid, TransactionId parent); extern TransactionId SubTransGetParent(TransactionId xid); extern TransactionId SubTransGetTopmostTransaction(TransactionId xid); -extern int SUBTRANSShmemSize(void); +extern Size SUBTRANSShmemSize(void); extern void SUBTRANSShmemInit(void); extern void BootStrapSUBTRANS(void); extern void StartupSUBTRANS(TransactionId oldestActiveXID); diff --git a/src/include/access/twophase.h b/src/include/access/twophase.h index e90b9e304db..18fc3f9171b 100644 --- a/src/include/access/twophase.h +++ b/src/include/access/twophase.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/twophase.h,v 1.4 2005/06/28 05:09:03 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/twophase.h,v 1.5 2005/08/20 23:26:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,7 +27,7 @@ typedef struct GlobalTransactionData *GlobalTransaction; /* GUC variable */ extern int max_prepared_xacts; -extern int TwoPhaseShmemSize(void); +extern Size TwoPhaseShmemSize(void); extern void TwoPhaseShmemInit(void); extern PGPROC *TwoPhaseGetDummyProc(TransactionId xid); diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index c16fdeeebd7..b5a4667c112 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.67 2005/07/29 19:30:08 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.68 2005/08/20 23:26:29 tgl Exp $ */ #ifndef XLOG_H #define XLOG_H @@ -156,7 +156,7 @@ extern void xlog_redo(XLogRecPtr lsn, XLogRecord *record); extern void xlog_desc(char *buf, uint8 xl_info, char *rec); extern void UpdateControlFile(void); -extern int XLOGShmemSize(void); +extern Size XLOGShmemSize(void); extern void XLOGShmemInit(void); extern void BootStrapXLOG(void); extern void StartupXLOG(void); diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 368f1935fa9..06aca08d90b 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -604,6 +604,9 @@ your system. */ #undef PTHREAD_CREATE_JOINABLE +/* The size of a `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T + /* The size of a `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG diff --git a/src/include/postmaster/bgwriter.h b/src/include/postmaster/bgwriter.h index 3cdfef1750f..c097308cc7b 100644 --- a/src/include/postmaster/bgwriter.h +++ b/src/include/postmaster/bgwriter.h @@ -5,7 +5,7 @@ * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/postmaster/bgwriter.h,v 1.6 2005/06/30 00:00:52 tgl Exp $ + * $PostgreSQL: pgsql/src/include/postmaster/bgwriter.h,v 1.7 2005/08/20 23:26:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -28,7 +28,7 @@ extern void RequestCheckpoint(bool waitforit, bool warnontime); extern bool ForwardFsyncRequest(RelFileNode rnode, BlockNumber segno); extern void AbsorbFsyncRequests(void); -extern int BgWriterShmemSize(void); +extern Size BgWriterShmemSize(void); extern void BgWriterShmemInit(void); #endif /* _BGWRITER_H */ diff --git a/src/include/postmaster/postmaster.h b/src/include/postmaster/postmaster.h index 1b11d056c71..0ad21cf59c0 100644 --- a/src/include/postmaster/postmaster.h +++ b/src/include/postmaster/postmaster.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/postmaster/postmaster.h,v 1.10 2005/05/15 00:26:19 momjian Exp $ + * $PostgreSQL: pgsql/src/include/postmaster/postmaster.h,v 1.11 2005/08/20 23:26:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -42,7 +42,7 @@ extern void ClosePostmasterPorts(bool am_syslogger); extern pid_t postmaster_forkexec(int argc, char *argv[]); extern int SubPostmasterMain(int argc, char *argv[]); -extern size_t ShmemBackendArraySize(void); +extern Size ShmemBackendArraySize(void); extern void ShmemBackendArrayAllocation(void); #endif diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index 2bd210dfb52..6e083be21ba 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.78 2005/05/19 21:35:47 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.79 2005/08/20 23:26:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -182,11 +182,11 @@ extern long int LocalBufferFlushCount; extern BufferDesc *StrategyGetBuffer(void); extern void StrategyFreeBuffer(BufferDesc *buf, bool at_head); extern int StrategySyncStart(void); -extern int StrategyShmemSize(void); +extern Size StrategyShmemSize(void); extern void StrategyInitialize(bool init); /* buf_table.c */ -extern int BufTableShmemSize(int size); +extern Size BufTableShmemSize(int size); extern void InitBufTable(int size); extern int BufTableLookup(BufferTag *tagPtr); extern int BufTableInsert(BufferTag *tagPtr, int buf_id); diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index a88565e1596..63def4a2e29 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.95 2005/08/12 05:05:51 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.96 2005/08/20 23:26:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -140,7 +140,7 @@ extern void DropBuffers(Oid dbid); #ifdef NOT_USED extern void PrintPinnedBufs(void); #endif -extern int BufferShmemSize(void); +extern Size BufferShmemSize(void); extern RelFileNode BufferGetFileNode(Buffer buffer); extern void SetBufferCommitInfoNeedsSave(Buffer buffer); diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h index fe6cca76bcd..1ce7b7f08ae 100644 --- a/src/include/storage/freespace.h +++ b/src/include/storage/freespace.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.17 2004/12/31 22:03:42 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.18 2005/08/20 23:26:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,7 +37,7 @@ extern int MaxFSMPages; * function prototypes */ extern void InitFreeSpaceMap(void); -extern int FreeSpaceShmemSize(void); +extern Size FreeSpaceShmemSize(void); extern BlockNumber GetPageWithFreeSpace(RelFileNode *rel, Size spaceNeeded); extern BlockNumber RecordAndGetPageWithFreeSpace(RelFileNode *rel, diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index e434683d0e5..6610b1381b7 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.89 2005/06/17 22:32:50 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.90 2005/08/20 23:26:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -391,7 +391,7 @@ extern int LockCheckConflicts(LockMethod lockMethodTable, extern void GrantLock(LOCK *lock, PROCLOCK *proclock, LOCKMODE lockmode); extern void GrantAwaitedLock(void); extern void RemoveFromWaitQueue(PGPROC *proc); -extern int LockShmemSize(void); +extern Size LockShmemSize(void); extern bool DeadLockCheck(PGPROC *proc); extern void DeadLockReport(void); extern void RememberSimpleDeadLock(PGPROC *proc1, diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h index 16c369117c7..98d1d40ad53 100644 --- a/src/include/storage/lwlock.h +++ b/src/include/storage/lwlock.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.21 2005/07/27 08:05:36 neilc Exp $ + * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.22 2005/08/20 23:26:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -73,7 +73,7 @@ extern void LWLockReleaseAll(void); extern bool LWLockHeldByMe(LWLockId lockid); extern int NumLWLocks(void); -extern int LWLockShmemSize(void); +extern Size LWLockShmemSize(void); extern void CreateLWLocks(void); #endif /* LWLOCK_H */ diff --git a/src/include/storage/pg_shmem.h b/src/include/storage/pg_shmem.h index ea7ecd16a97..c034e19ce4b 100644 --- a/src/include/storage/pg_shmem.h +++ b/src/include/storage/pg_shmem.h @@ -17,7 +17,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.14 2004/12/31 22:03:42 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.15 2005/08/20 23:26:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -29,8 +29,8 @@ typedef struct PGShmemHeader /* standard header for all Postgres shmem */ int32 magic; /* magic # to identify Postgres segments */ #define PGShmemMagic 679834893 pid_t creatorPID; /* PID of creating process */ - uint32 totalsize; /* total size of segment */ - uint32 freeoffset; /* offset to first free space */ + Size totalsize; /* total size of segment */ + Size freeoffset; /* offset to first free space */ #ifndef WIN32 /* Windows doesn't have useful inode#s */ dev_t device; /* device data directory is on */ ino_t inode; /* inode number of data directory */ @@ -45,8 +45,8 @@ extern void *UsedShmemSegAddr; extern void PGSharedMemoryReAttach(void); #endif -extern PGShmemHeader *PGSharedMemoryCreate(uint32 size, bool makePrivate, - int port); +extern PGShmemHeader *PGSharedMemoryCreate(Size size, bool makePrivate, + int port); extern bool PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2); extern void PGSharedMemoryDetach(void); diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 63090de1cfd..b9c9c5d5be6 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.80 2005/07/31 17:19:22 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.81 2005/08/20 23:26:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -122,7 +122,7 @@ extern int StatementTimeout; * Function Prototypes */ extern int ProcGlobalSemas(void); -extern int ProcGlobalShmemSize(void); +extern Size ProcGlobalShmemSize(void); extern void InitProcGlobal(void); extern void InitProcess(void); extern void InitDummyProcess(int proctype); diff --git a/src/include/storage/procarray.h b/src/include/storage/procarray.h index af1209d2192..1c010ff5b00 100644 --- a/src/include/storage/procarray.h +++ b/src/include/storage/procarray.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/procarray.h,v 1.4 2005/08/20 01:26:29 ishii Exp $ + * $PostgreSQL: pgsql/src/include/storage/procarray.h,v 1.5 2005/08/20 23:26:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,7 +17,7 @@ #include "storage/lock.h" -extern int ProcArrayShmemSize(void); +extern Size ProcArrayShmemSize(void); extern void CreateSharedProcArray(void); extern void ProcArrayAdd(PGPROC *proc); extern void ProcArrayRemove(PGPROC *proc); diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h index 417b7b65e9a..520f8eb3adf 100644 --- a/src/include/storage/shmem.h +++ b/src/include/storage/shmem.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.44 2004/12/31 22:03:42 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.45 2005/08/20 23:26:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -68,7 +68,8 @@ extern void InitShmemIndex(void); extern HTAB *ShmemInitHash(const char *name, long init_size, long max_size, HASHCTL *infoP, int hash_flags); extern void *ShmemInitStruct(const char *name, Size size, bool *foundPtr); - +extern Size add_size(Size s1, Size s2); +extern Size mul_size(Size s1, Size s2); /* size constants for the shmem index table */ /* max size of data structure string name */ diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h index 0f4c0f68f3f..2fe0cce8366 100644 --- a/src/include/storage/sinval.h +++ b/src/include/storage/sinval.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/sinval.h,v 1.41 2005/05/19 21:35:47 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/sinval.h,v 1.42 2005/08/20 23:26:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -83,8 +83,8 @@ typedef union } SharedInvalidationMessage; -extern int SInvalShmemSize(int maxBackends); -extern void CreateSharedInvalidationState(int maxBackends); +extern Size SInvalShmemSize(void); +extern void CreateSharedInvalidationState(void); extern void InitBackendSharedInvalidationState(void); extern void SendSharedInvalidMessage(SharedInvalidationMessage *msg); diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h index 0be6a386508..7d1f5f46855 100644 --- a/src/include/storage/sinvaladt.h +++ b/src/include/storage/sinvaladt.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/sinvaladt.h,v 1.38 2005/05/19 21:35:47 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/sinvaladt.h,v 1.39 2005/08/20 23:26:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -107,7 +107,7 @@ extern SISeg *shmInvalBuffer; /* pointer to the shared inval buffer */ /* * prototypes for functions in sinvaladt.c */ -extern void SIBufferInit(int maxBackends); +extern void SIBufferInit(void); extern int SIBackendInit(SISeg *segP); extern bool SIInsertDataEntry(SISeg *segP, SharedInvalidationMessage *data); diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h index b4bede7666e..0821610b9bb 100644 --- a/src/include/utils/hsearch.h +++ b/src/include/utils/hsearch.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/hsearch.h,v 1.39 2005/06/26 23:32:34 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/hsearch.h,v 1.40 2005/08/20 23:26:37 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -190,7 +190,7 @@ extern void *hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr); extern void hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp); extern void *hash_seq_search(HASH_SEQ_STATUS *status); -extern long hash_estimate_size(long num_entries, Size entrysize); +extern Size hash_estimate_size(long num_entries, Size entrysize); extern long hash_select_dirsize(long num_entries); /* |