aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-03-06 21:17:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-03-06 21:17:56 +0000
commit731603a92b115db97c1202df243954195070c500 (patch)
tree1f1226cc72e3635f2800042ebfda6316d9f8a2ea /src/include
parent03842eb03bbded18a55177e40594018f05a73623 (diff)
downloadpostgresql-731603a92b115db97c1202df243954195070c500.tar.gz
postgresql-731603a92b115db97c1202df243954195070c500.zip
A few further tweaks to shared memory space estimation.
This change brings the default size of the main shmem block back under 1MB, which is a fairly popular value for the kernel's SHMMAX parameter.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/lock.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index ce1f30133f3..da77f1d523c 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lock.h,v 1.23 1999/02/21 01:41:47 tgl Exp $
+ * $Id: lock.h,v 1.24 1999/03/06 21:17:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,8 +57,6 @@ typedef int LOCKMETHOD;
#define USER_LOCKMETHOD 2
#define MIN_LOCKMETHOD DEFAULT_LOCKMETHOD
-/*typedef struct LOCK LOCK; */
-
typedef struct LTAG
{
@@ -174,6 +172,9 @@ typedef struct XIDLookupEnt
SHM_QUEUE queue;
} XIDLookupEnt;
+#define SHMEM_XIDTAB_KEYSIZE sizeof(XIDTAG)
+#define SHMEM_XIDTAB_DATASIZE (sizeof(XIDLookupEnt) - SHMEM_XIDTAB_KEYSIZE)
+
#define XID_TAGSIZE (sizeof(XIDTAG))
#define XIDENT_LOCKMETHOD(xident) (XIDTAG_LOCKMETHOD((xident).tag))
@@ -210,6 +211,9 @@ typedef struct LOCK
int nActive;
} LOCK;
+#define SHMEM_LOCKTAB_KEYSIZE sizeof(LOCKTAG)
+#define SHMEM_LOCKTAB_DATASIZE (sizeof(LOCK) - SHMEM_LOCKTAB_KEYSIZE)
+
#define LOCK_LOCKMETHOD(lock) (LOCKTAG_LOCKMETHOD((lock).tag))
#define LockGetLock_nHolders(l) l->nHolders