473,786 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3166
Martin Marques <ma****@bugs.un l.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.un l.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.ed u.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 YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 12 '05 #3
Martin Marques <ma****@bugs.un l.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 YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 12 '05 #4
El Dom 16 Nov 2003 15:23, Tom Lane escribió:
Martin Marques <ma****@bugs.un l.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.ed u.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*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #5
Martin Marques <ma****@bugs.un l.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 YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 12 '05 #6
El Dom 16 Nov 2003 16:56, escribió:
Martin Marques <ma****@bugs.un l.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.ed u.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
1547
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 plpgsql and plperl. To say that it all works great hugely underestimates the improvements. Thank you! Great work, guys! Here's one comparison of a query that choked 7.3.4 and flies in 7.4RC2:
2
1273
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 RC2 simply stamped 'Final' or were there any last fixes that I should worry about? Cheers, Chris --
1
1869
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 --libdir=/scratch/postgresql-7.4/lib make make install I then put /scratch/postgresql/bin/ in my PATH and /scratch/postgresql/lib
9
8357
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" nor /pgsql/bin/ on my system. Since apt did not create these directories how can I do it manually? Thanks,
1
1368
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 following error: ERROR: nodeRead: did not find '}' at end of plan node
0
1196
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 database cluster will be initialized with locale C.
1
1899
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 user must also own the server process. The database cluster will be initialized with locale C. fixing permissions on existing directory /Gauss/rr/data... ok
0
2044
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. Problem though. I have to run initdb as user postgres, but I need to be root to edit the stuff in /etc. So I can't run initdb as root or postgres. I lose either way. Also, since the configs are symlinked in etc, is there an elegant way to...
1
2111
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: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.