summaryrefslogtreecommitdiff
path: root/src/include/storage/sinvaladt.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-08-29 21:02:12 +0000
committerBruce Momjian <bruce@momjian.us>2002-08-29 21:02:12 +0000
commit626eca697cf4470c44cb76f0603302201538c47e (patch)
tree8acf0b4c0b80977aa189ad75a0434b7f78af80d6 /src/include/storage/sinvaladt.h
parent1761990e385c7d761184425c95c8045303b81084 (diff)
downloadpostgresql-626eca697cf4470c44cb76f0603302201538c47e.tar.gz
This patch reserves the last superuser_reserved_connections slots for
connections by the superuser only. This patch replaces the last patch I sent a couple of days ago. It closes a connection that has not been authorised by a superuser if it would leave less than the GUC variable ReservedBackends (superuser_reserved_connections in postgres.conf) backend process slots free in the SISeg. This differs to the first patch which only reserved the last ReservedBackends slots in the procState array. This has made the free slot test more expensive due to the use of a lock. After thinking about a comment on the first patch I've also made it a fatal error if the number of reserved slots is not less than the maximum number of connections. Nigel J. Andrews
Diffstat (limited to 'src/include/storage/sinvaladt.h')
-rw-r--r--src/include/storage/sinvaladt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h
index 3e95342c9f..39c895026b 100644
--- a/src/include/storage/sinvaladt.h
+++ b/src/include/storage/sinvaladt.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: sinvaladt.h,v 1.32 2002/06/20 20:29:52 momjian Exp $
+ * $Id: sinvaladt.h,v 1.33 2002/08/29 21:02:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -85,6 +85,7 @@ typedef struct SISeg
int lastBackend; /* index of last active procState entry,
* +1 */
int maxBackends; /* size of procState array */
+ int freeBackends; /* number of empty procState slots */
/*
* Circular buffer holding shared-inval messages