List Info

Thread: multiple postgresql servers in multiple jails?




multiple postgresql servers in multiple jails?
country flaguser name
Germany
2007-10-23 13:07:19
Does anybody have a running system with more than one jail
hosting
more than one postgres server?

I can only have one pgsql database on one host at all.  I
already
tried to increase the shared memory off my machine with
additional
kernel [1] and sysctl parameters [2] and I also tried to
change
the numeric UID directly in the jails into a seperate one. 
Same
errors.

Of course I already have defined 
jail_sysvipc_allow="YES"  in
rc.conf.  I have this issue on 6.2-RELEASE-p8 and
8.0-CURRENT with
postgresql-server-8.2.5_1.

------------------------------------------------------------
------------
% psql
psql: FATAL:  semctl(458753, 15, SETVAL, 0) failed: Invalid
argument
------------------------------------------------------------
------------

Or some fun with perl/DBD
------------------------------------------------------------
------------
Out of memory during request for 108 bytes, total sbrk() is
534585344 bytes!
Out of memory during request for 288 bytes, total sbrk() is
534585344 bytes!
Out of memory during request for 288 bytes, total sbrk() is
534585344 bytes!
------------------------------------------------------------
------------

[1]
options         SYSVSHM
options         SYSVSEM
options         SYSVMSG
options         SHMMAXPGS=65536
options         SEMMNI=40
options         SEMMNS=240
options         SEMUME=40
options         SEMMNU=120

[2] http://
www.freebsddiary.org/jail-multiple.php

-- 
Oliver PETER, eMail: hoschimouhaha.de, ICQ# 113969174
"Worker bees can leave.  Even drones can fly away.
                         The Queen is their slave."
Re: multiple postgresql servers in multiple jails?
country flaguser name
Germany
2007-10-23 15:06:08
Oliver Peter wrote:
 > Does anybody have a running system with more than one
jail hosting
 > more than one postgres server?

Yes, you must configure them to use different port numbers,
because the SysV IPC IDs are derived from the port number.
If you try to run both servers with the default port,
you'll
get a conflict.  Configure different port numbers, and it
will work.

By the way, the PostgreSQL developers do _not_ recommend to
run multiple servers on the same machine, because of bad
efficiency.  It is much better (performance-wise) to run
all databases within the same server engine.  PostgreSQL
has all the authentication and permission features you need
to separate multiple databases within a single server, so
there is really no need to use multiple jails.

 > options         SHMMAXPGS=65536
 > options         SEMMNI=40
 > options         SEMMNS=240
 > options         SEMUME=40
 > options         SEMMNU=120

I have these on a machine with a single PostgreSQL server,
as per recommendations of the developers:

options         SHMMAXPGS=65536
options         SEMMAP=1024
options         SEMMNI=64
options         SEMMNS=1024
options         SEMUME=64
options         SEMMNU=128

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29,
85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, 
Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister:
Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb,
Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd


"C++ is the only current language making COBOL look
good."
        -- Bertrand Meyer
_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: multiple postgresql servers in multiple jails?
country flaguser name
Germany
2007-10-24 08:55:36
On Tue, Oct 23, 2007 at 10:06:08PM +0200, Oliver Fromme
wrote:
> Oliver Peter wrote:
>  > Does anybody have a running system with more than
one jail hosting
>  > more than one postgres server?
> 
> Yes, you must configure them to use different port
numbers,
> because the SysV IPC IDs are derived from the port
number.
> If you try to run both servers with the default port,
you'll
> get a conflict.  Configure different port numbers, and
it
> will work.

Thanks for that hint.  After changing the port numbers for
each
instance to a different one, it works - but only at first
glance.
After making some test creates and inserts to all servers at
the same
time I receive the 'out of memory' messages again...
Different UIDs, different ports, same error.

> By the way, the PostgreSQL developers do _not_
recommend to
> run multiple servers on the same machine, because of
bad
> efficiency.  It is much better (performance-wise) to
run
> all databases within the same server engine. 
PostgreSQL
> has all the authentication and permission features you
need
> to separate multiple databases within a single server,
so
> there is really no need to use multiple jails.

Of course I understand that.  But I would like to setup a
test server
in a different jail beside my production jail/pgsql-server
to be sure
not to crash my production server.
Performance does not matter (at this time in this specific
case of
course!).

> I have these on a machine with a single PostgreSQL
server,
> as per recommendations of the developers:
> 
> options         SHMMAXPGS=65536
> options         SEMMAP=1024
> options         SEMMNI=64
> options         SEMMNS=1024
> options         SEMUME=64
> options         SEMMNU=128

Is this a good recommendation for a machine with only 1GB of
RAM?

-- 
Oliver PETER, eMail: hoschimouhaha.de, ICQ# 113969174
"Worker bees can leave.  Even drones can fly away.
                         The Queen is their slave."
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )