Thread: One store, two machines?

One store, two machines?

From
"Michael R. Jinks"
Date:
Greetings.

We would like to implement a PostgreSQL database in such a way that the data
are housed on disk volumes which are redundant across two Solaris (or maybe
Linux) hosts.  Both hosts must have write access to the store -- a master
system/backup system scheme is not acceptable for us; was also want this to
be a load balancing setup.

Does Postgres have a facility for keeping data stores on two hosts in sync?

TIA,
-m
--
Michael Jinks, IB
Systems Administrator, CCCP
finger mjinks@embley.spc.uchicago.edu for public key
A guiding voice for all humanity: http://www.yellow5.com/pokey/

Too many clients - Error

From
Florian Meyer-Kassel
Date:
Hi out there.

Since this morning I'm getting this error when I try to connect to our DB-Server:

Sorry, too many clients already


What does that mean ? Where can I set this limit ? What's the cause for this
error ? I didn't have this before...


Greetings

/FMK



Re: Too many clients - Error

From
John McKown
Date:
On Wed, 26 Jul 2000, Florian Meyer-Kassel wrote:

> Hi out there.
>
> Since this morning I'm getting this error when I try to connect to our
> DB-Server:
>
> Sorry, too many clients already
>
>
> What does that mean ? Where can I set this limit ? What's the cause for this
> error ? I didn't have this before...
>

PostgreSQL as normally distributed only allows 32 concurrent users. You
have exceeded this number of users. You can fix this in one of two ways.
The hard way is to reconfigure & recompile PostgreSQL using the
--with-maxbackends=1024 (maximum number of users is 1024!). The simple way
is to edit the PostgreSQL startup script to include the parameter
 "-N 1024" to set the maximum number of concurrent connections to 1024.

I don't see any command to list who is currently using PostgreSQL.

Hope this helps some,
John


Re: One store, two machines?

From
"D. Duccini"
Date:
Yeah, its called RAID ;)

seriously, consider using a Mylex external controller that has twin SCSI
bus interfaces on it that allows for multiple hosts

the other option would be to write a trigger mechanism implemented in the
database to do the writes

On Wed, 26 Jul 2000, Michael R. Jinks wrote:

> Greetings.
>
> We would like to implement a PostgreSQL database in such a way that the data
> are housed on disk volumes which are redundant across two Solaris (or maybe
> Linux) hosts.  Both hosts must have write access to the store -- a master
> system/backup system scheme is not acceptable for us; was also want this to
> be a load balancing setup.
>
> Does Postgres have a facility for keeping data stores on two hosts in sync?
>
> TIA,
> -m
> --
> Michael Jinks, IB
> Systems Administrator, CCCP
> finger mjinks@embley.spc.uchicago.edu for public key
> A guiding voice for all humanity: http://www.yellow5.com/pokey/
>


-----------------------------------------------------------------------------
david@backpack.com            BackPack Software, Inc.        www.backpack.com
+1 651.645.7550 voice       "Life is an Adventure.
+1 651.645.9798 fax            Don't forget your BackPack!"
-----------------------------------------------------------------------------


Re: Too many clients - Error

From
Tom Lane
Date:
John McKown <jmckown@prodigy.net> writes:
> PostgreSQL as normally distributed only allows 32 concurrent users. You
> have exceeded this number of users. You can fix this in one of two ways.
> The hard way is to reconfigure & recompile PostgreSQL using the
> --with-maxbackends=1024 (maximum number of users is 1024!). The simple way
> is to edit the PostgreSQL startup script to include the parameter
>  "-N 1024" to set the maximum number of concurrent connections to 1024.

Note you will also need to increase -B (to at least twice -N).

It may be a bad idea to raise the limit as far as 1024, unless your
platform is really configured to support that many active backends
(which means LOTS of RAM and swap space, lots of kernel open-file-table
entries, etc).  The reason the default is 32 is that that roughly
corresponds to the factory-stock limits in many Unixen about size of
shared memory blocks and so forth.  Don't be surprised if you have to
rejigger kernel parameter settings before you can go up very far.

> I don't see any command to list who is currently using PostgreSQL.

"ps -aux | grep postgres" (adapt to local situation...)

            regards, tom lane