473,394 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Error on initdb with 7.4RC2

When running initdb on a fresh 7.4 install I get this error:

postgres@bugs:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -E
latin1
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 es_AR.

creating directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating directory /usr/local/pgsql/data/pg_clog... ok
selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... FATAL:
semctl(1638435, 16, SETVAL, 536) failed: Argumento inválido

Any ideas on how to fix it?
--
11:09:01 up 23 days, 18:31, 5 users, load average: 0.46, 0.63, 0.81
-----------------------------------------------------------------
Martín Marqués | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica | DBA, Programador, Administrador
Universidad Nacional
del Litoral
-----------------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #1
6 3137
Martin Marques <ma****@bugs.unl.edu.ar> writes:
creating template1 database in /usr/local/pgsql/data/base/1... FATAL:
semctl(1638435, 16, SETVAL, 536) failed: Argumento inválido


Hmm. If it got that far and no farther, I'd guess you have SEMVMX
set too small.

regards, tom lane

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

Nov 12 '05 #2
El Vie 14 Nov 2003 12:37, Tom Lane escribió:
Martin Marques <ma****@bugs.unl.edu.ar> writes:
creating template1 database in /usr/local/pgsql/data/base/1... FATAL:
semctl(1638435, 16, SETVAL, 536) failed: Argumento inválido


Hmm. If it got that far and no farther, I'd guess you have SEMVMX
set too small.


Is there a way of changing this value on Linux without recompiling?
I remember that on solaris I had to change a file and restart the server.

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-----------------------------------------------------------------
Martín Marqués | mm******@unl.edu.ar
Programador, Administrador, DBA | Centro de Telemática
Universidad Nacional
del Litoral
-----------------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #3
Martin Marques <ma****@bugs.unl.edu.ar> writes:
El Vie 14 Nov 2003 12:37, Tom Lane escribió:
Hmm. If it got that far and no farther, I'd guess you have SEMVMX
set too small.
Is there a way of changing this value on Linux without recompiling?


See sysctl. But what is the current value? I've never heard of a Linux
installation with small SEMVMX.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #4
El Dom 16 Nov 2003 15:23, Tom Lane escribió:
Martin Marques <ma****@bugs.unl.edu.ar> writes:
El Vie 14 Nov 2003 12:37, Tom Lane escribió:
Hmm. If it got that far and no farther, I'd guess you have SEMVMX
set too small.

Is there a way of changing this value on Linux without recompiling?


See sysctl. But what is the current value? I've never heard of a Linux
installation with small SEMVMX.


martin@bugs:~/latex$ cat /proc/sys/kernel/sem
250 32000 32 128

This is a Linux Kernel for SPARC (Debian) that came with the distribution (no
recompile done yet here).

martin@bugs:~/latex$ uname -a
Linux bugs 2.4.21 #1 Thu Aug 7 20:30:12 EDT 2003 sparc64 GNU/Linux

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-----------------------------------------------------------------
Martín Marqués | mm******@unl.edu.ar
Programador, Administrador, DBA | Centro de Telemática
Universidad Nacional
del Litoral
-----------------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #5
Martin Marques <ma****@bugs.unl.edu.ar> writes:
El Dom 16 Nov 2003 15:23, Tom Lane escribió:
See sysctl. But what is the current value? I've never heard of a Linux
installation with small SEMVMX.
martin@bugs:~/latex$ cat /proc/sys/kernel/sem
250 32000 32 128 This is a Linux Kernel for SPARC (Debian) that came with the distribution (no
recompile done yet here).


As far as I can tell, SEMVMX isn't readable or writable via /proc or
sysctl in Linux at all; at least it is not visible in my Red Hat 8.0
installation. So it's really hard to see why it'd be different in
your installation than everywhere else.

Just to make sure we're barking up the right tree, would you see whether
it helps to change this line in src/backend/port/sysv_sema.c:

#define PGSemaMagic 537 /* must be less than SEMVMX */

Try making it 100 or so instead of 537.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #6
El Dom 16 Nov 2003 16:56, escribió:
Martin Marques <ma****@bugs.unl.edu.ar> writes:
El Dom 16 Nov 2003 15:23, Tom Lane escribió:
See sysctl. But what is the current value? I've never heard of a Linux
installation with small SEMVMX.
martin@bugs:~/latex$ cat /proc/sys/kernel/sem
250 32000 32 128

This is a Linux Kernel for SPARC (Debian) that came with the distribution

(no recompile done yet here).


As far as I can tell, SEMVMX isn't readable or writable via /proc or
sysctl in Linux at all; at least it is not visible in my Red Hat 8.0
installation. So it's really hard to see why it'd be different in
your installation than everywhere else.

Just to make sure we're barking up the right tree, would you see whether
it helps to change this line in src/backend/port/sysv_sema.c:

#define PGSemaMagic 537 /* must be less than SEMVMX */

Try making it 100 or so instead of 537.


Same problem. Changed it and I got this:

bugs:/home/martin/basura/postgresql-7.4RC2# su - postgres
postgres@bugs:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -E
latin1
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.

creating directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating directory /usr/local/pgsql/data/pg_clog... ok
selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... FATAL:
semctl(7766033, 16, SETVAL, 99) failed: Invalid argument

initdb: failed
initdb: removing data directory "/usr/local/pgsql/data"
Now the interesting part of all this is that, with all the initdb that failed,
lots of semaphores where been used, so when I tried this last initdb at first
I got this, which looks like I'm out of semaphores, not as in the message
from above:

postgres@bugs:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -E
latin1
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.

creating directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating directory /usr/local/pgsql/data/pg_clog... ok
selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... FATAL: could
not create semaphores: No space left on device
DETAIL: Failed system call was semget(129, 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 10).
The PostgreSQL documentation contains more information about
configuring your system for PostgreSQL.

initdb: failed
initdb: removing data directory "/usr/local/pgsql/data"
--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-----------------------------------------------------------------
Martín Marqués | mm******@unl.edu.ar
Programador, Administrador, DBA | Centro de Telemática
Universidad Nacional
del Litoral
-----------------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Reece Hart | last post by:
More praise for 7.4RC2: I've installed 7.4RC2 and restored a fairly complex 20GB database (from 7.3.4) with ~75M rows in 30 tables and 4 schemas, numerous triggers and constraints, procs in...
2
by: Christopher Murtagh | last post by:
Just wondering if there were indeed any changes between 7.4 and 7.4RC2. I had to go live with 7.4RC2 on the weekend (it passed all of our tests quite well and we needed some of its features). Was...
1
by: Seamus Thomas Carroll | last post by:
Hi, I have installed postgres in a non-standard location with this call to configure: ../configure --prefix=/scratch/postgresql-7.4/ --exec-prefix=/scratch/postgresql-7.4...
9
by: Jerome Lyles | last post by:
Hello List, I have installed Postgresql 7.4 on a Suse 9.0 system using apt. I cannot do this: /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data Because there is no "/pgsql/bin/initdb"...
1
by: Sven Eschenberg | last post by:
Hallo pgsql-general Fellas, First: I am not subscribed to the list, I will check back on the web though. When I try to connect to my databases (actually it'S true for two of them), I get the...
0
by: Taras V. Panchenko | last post by:
Dear Sirs! Every time I tried to run initdb I get $ initdb The files belonging to this database system will be owned by user "Taras". This user must also own the server process. The...
1
by: Randy Yates | last post by:
Can't get the postgres server started under Win2000/cygwin. Here's what happens: $ initdb -D /Gauss/rr/data -W The files belonging to this database system will be owned by user "yates". This...
0
by: Randall Smith | last post by:
I would like to be able to initdb to get a clean database to test backups. Reading the Debian version of the Postgresql README, I see that I should use the --debian-conffile option with initdb. ...
1
by: Jerry LeVan | last post by:
I guess the subject says it all, can I install the B5 release to a B4 db without starting from scratch? Jerry ---------------------------(end of broadcast)--------------------------- TIP 2:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.