dbTalk Databases Forums  

[BUGS] PgSQL74b2: initdb fails (max_connections)

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] PgSQL74b2: initdb fails (max_connections) in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Janko Richter
 
Posts: n/a

Default [BUGS] PgSQL74b2: initdb fails (max_connections) - 09-03-2003 , 03:51 PM






On FreeBSD 5.1 using PgSQL 7.4b2 initdb failed with:

su-2.05b$ ./initdb -D /data/pgsql
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /data/pgsql... ok
creating directory /data/pgsql/base... ok
creating directory /data/pgsql/global... ok
creating directory /data/pgsql/pg_xlog... ok
creating directory /data/pgsql/pg_clog... ok
selecting default shared_buffers... 1000
selecting default max_connections... 40
creating configuration files... ok
creating template1 database in /data/pgsql/base/1... ./postgres -boot
-x1 -F -D/data/pgsql template1
FATAL: could not create semaphores: No space left on device
DETAIL: Failed syscall was semget(4, 17, 03600).
HINT: This error does *not* mean that you have run out of disk space.
It occurs when either the system limit for the maximum number of
semaphore sets (SEMMNI), or the system wide maximum number of semaphores
(SEMMNS), would be exceeded. You need to raise the respective kernel
parameter. Alternatively, reduce PostgreSQL's consumption of semaphores
by reducing its max_connections parameter (currently 100).
The PostgreSQL documentation contains more information about configuring
your system for PostgreSQL.

initdb: failed


Why does initdb use max_connections=100, but "selecting default
max_connections" gives 40 ?

This patch solves the problem:

--- initdb.orig Wed Sep 3 09:49:01 2003
+++ initdb Wed Sep 3 09:50:38 2003
@@ -575,7 +575,7 @@
break
fi
done
-
+PGSQL_OPT="$PGSQL_OPT -c max_connections=$nconns"
echo "$nconns"

################################################## ########################




Regards,
--
Janko Richter


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] PgSQL74b2: initdb fails (max_connections) - 09-03-2003 , 05:59 PM







We just fixed this so our next beta will be correct. CVS already has
the fix.

---------------------------------------------------------------------------

Janko Richter wrote:
Quote:
On FreeBSD 5.1 using PgSQL 7.4b2 initdb failed with:

su-2.05b$ ./initdb -D /data/pgsql
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /data/pgsql... ok
creating directory /data/pgsql/base... ok
creating directory /data/pgsql/global... ok
creating directory /data/pgsql/pg_xlog... ok
creating directory /data/pgsql/pg_clog... ok
selecting default shared_buffers... 1000
selecting default max_connections... 40
creating configuration files... ok
creating template1 database in /data/pgsql/base/1... ./postgres -boot
-x1 -F -D/data/pgsql template1
FATAL: could not create semaphores: No space left on device
DETAIL: Failed syscall was semget(4, 17, 03600).
HINT: This error does *not* mean that you have run out of disk space.
It occurs when either the system limit for the maximum number of
semaphore sets (SEMMNI), or the system wide maximum number of semaphores
(SEMMNS), would be exceeded. You need to raise the respective kernel
parameter. Alternatively, reduce PostgreSQL's consumption of semaphores
by reducing its max_connections parameter (currently 100).
The PostgreSQL documentation contains more information about configuring
your system for PostgreSQL.

initdb: failed


Why does initdb use max_connections=100, but "selecting default
max_connections" gives 40 ?

This patch solves the problem:

--- initdb.orig Wed Sep 3 09:49:01 2003
+++ initdb Wed Sep 3 09:50:38 2003
@@ -575,7 +575,7 @@
break
fi
done
-
+PGSQL_OPT="$PGSQL_OPT -c max_connections=$nconns"
echo "$nconns"

################################################## ########################




Regards,
--
Janko Richter


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] PgSQL74b2: initdb fails (max_connections) - 09-03-2003 , 09:36 PM



Janko Richter <jankorichter (AT) yahoo (DOT) de> writes:
Quote:
On FreeBSD 5.1 using PgSQL 7.4b2 initdb failed with:
Yeah, it's broken on any system with shmmax too small for the
defaults :-(. My fault.

Quote:
This patch solves the problem:
It's fixed in a different way in CVS tip.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.