Thread: RE: 2 computers 1hd 2 postgres daemons. Is it possib le?

RE: 2 computers 1hd 2 postgres daemons. Is it possib le?

From
"Clark, Joel"
Date:
Through an NFS mount maybe?

-----Original Message-----
From: Tony Simopoulos [mailto:karkalis@earthling.net]
Sent: Monday, October 16, 2000 3:03 PM
To: Oscar Serrano
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] 2 computers 1hd 2 postgres daemons. Is it
possible?


a redundant, replicated, or parallel system (choose whichever adjective
befits your desires) is being developed.  check out
http://www.erserver.com/.

sharing a single disk is an O/S & hardware problem.  what is your intended
platform?

good luck,

tonys.

----- Original Message -----
From: Oscar Serrano <oserra@fondos.net>
To: Postgres interfaces <pgsql-interfaces@postgresql.org>
Sent: Monday, October 16, 2000 2:15 PM
Subject: [INTERFACES] 2 computers 1hd 2 postgres daemons. Is it possible?


> Hi men :-)
> Just one question for those of you who have spent many time with postgres.
> I want to create a load balancing and High Availability system with two
> servers.
> This two server have a common hard disk: A RAID 5 server connected to them
> by the LAN.
> I have a hardware machine (WSD+ from RADWARE) that manages the load
> balancing.
> I want to have, two servers, and two postgres installations, one in each
> server, but with a  common PGDATA directory in the RAID.
> So, if one of the servers crashes, people can still get the information
from
> the other server.
> Esentially, what I want is, two postgres (one in each machine) with a
shared
> PGDATA directory, and that both postgres can access and do Inserts in the
> tables, and when one postgres does an insert, the second sees what the
first
> has inserted.
>
> Thanks.
>
>
>


Re: 2 computers 1hd 2 postgres daemons. Is it possible?

From
"Tony Simopoulos"
Date:
> Through an NFS mount maybe?
without a "distributed lock manager" sharing cannot be done efficiently.  NFS creates problems both desired features of
thisset-up.
 

1) High Availability
if the computer that is serving the NFS mount goes down, any other machine using the "share" goes down as well -- i.e.
single-point
of failure

2) Load Balancing
NFS is extremely expensive.  all that would be balanced is the database logic; in place sorting, connection overheads,
etc.
expensive reads and writes will all hit the NFS mounting server -- i.e. single-threading every query to the disk i/o of
onemachine.
 

tonys.

>
> -----Original Message-----
> From: Tony Simopoulos [mailto:karkalis@earthling.net]
> Sent: Monday, October 16, 2000 3:03 PM
> To: Oscar Serrano
> Cc: pgsql-interfaces@postgresql.org
> Subject: Re: [INTERFACES] 2 computers 1hd 2 postgres daemons. Is it
> possible?
>
>
> a redundant, replicated, or parallel system (choose whichever adjective
> befits your desires) is being developed.  check out
> http://www.erserver.com/.
>
> sharing a single disk is an O/S & hardware problem.  what is your intended
> platform?
>
> good luck,
>
> tonys.
>
> ----- Original Message -----
> From: Oscar Serrano <oserra@fondos.net>
> To: Postgres interfaces <pgsql-interfaces@postgresql.org>
> Sent: Monday, October 16, 2000 2:15 PM
> Subject: [INTERFACES] 2 computers 1hd 2 postgres daemons. Is it possible?
>
>
> > Hi men :-)
> > Just one question for those of you who have spent many time with postgres.
> > I want to create a load balancing and High Availability system with two
> > servers.
> > This two server have a common hard disk: A RAID 5 server connected to them
> > by the LAN.
> > I have a hardware machine (WSD+ from RADWARE) that manages the load
> > balancing.
> > I want to have, two servers, and two postgres installations, one in each
> > server, but with a  common PGDATA directory in the RAID.
> > So, if one of the servers crashes, people can still get the information
> from
> > the other server.
> > Esentially, what I want is, two postgres (one in each machine) with a
> shared
> > PGDATA directory, and that both postgres can access and do Inserts in the
> > tables, and when one postgres does an insert, the second sees what the
> first
> > has inserted.
> >
> > Thanks.
> >
> >
> >
>



RE: 2 computers 1hd 2 postgres daemons. Is it possible?

From
"Oscar Serrano"
Date:

> -----Mensaje original-----
> De: pgsql-interfaces-owner@hub.org
> [mailto:pgsql-interfaces-owner@hub.org]En nombre de Clark, Joel
> Enviado el: lunes, 16 de octubre de 2000 22:58
> Para: 'Tony Simopoulos'; Oscar Serrano
> CC: pgsql-interfaces@postgresql.org
> Asunto: RE: [INTERFACES] 2 computers 1hd 2 postgres daemons. Is it
> possible?
>
>
> Through an NFS mount maybe?
> a redundant, replicated, or parallel system (choose whichever adjective
> befits your desires) is being developed.  check out
> http://www.erserver.com/.

I've been looking to this URL and seems great what they are doing. But they
give very few information. I don't know if they are going to do exactly what
I need.

> sharing a single disk is an O/S & hardware problem.  what is your intended
> platform?

The platform is Linux. Both Linux access to the RAID by a NFS mount. I know
what I'm doing may be dangerous. There is a directory (/webpages) where I
put all web pages and scripts. And there is an Apache server on each linux
accessing this directory. It is not a problem because any script tries to
write to the same file at the same time.
But with postgres... ugh! here is a big problem. I've tried to start two
postgres, one in each Linux, and both having the PGDATA directory in the
RAID. Both postgres start correctly, but the changes one postgres does, are
not noticed by the second one.
It seems as if each change done in one postgres should be noticed to the
second one, so the second one should reread all system tables. Or something
like that :-?

Thank you all.


> good luck,
>
> tonys.
>
> ----- Original Message -----
> From: Oscar Serrano <oserra@fondos.net>
> To: Postgres interfaces <pgsql-interfaces@postgresql.org>
> Sent: Monday, October 16, 2000 2:15 PM
> Subject: [INTERFACES] 2 computers 1hd 2 postgres daemons. Is it possible?
>
>
> > Hi men :-)
> > Just one question for those of you who have spent many time
> with postgres.
> > I want to create a load balancing and High Availability system with two
> > servers.
> > This two server have a common hard disk: A RAID 5 server
> connected to them
> > by the LAN.
> > I have a hardware machine (WSD+ from RADWARE) that manages the load
> > balancing.
> > I want to have, two servers, and two postgres installations, one in each
> > server, but with a  common PGDATA directory in the RAID.
> > So, if one of the servers crashes, people can still get the information
> from
> > the other server.
> > Esentially, what I want is, two postgres (one in each machine) with a
> shared
> > PGDATA directory, and that both postgres can access and do
> Inserts in the
> > tables, and when one postgres does an insert, the second sees what the
> first
> > has inserted.
> >
> > Thanks.
> >
> >
> >
>



Re: 2 computers 1hd 2 postgres daemons. Is it possible?

From
Tom Lane
Date:
"Oscar Serrano" <oserra@fondos.net> writes:
> But with postgres... ugh! here is a big problem. I've tried to start two
> postgres, one in each Linux, and both having the PGDATA directory in the
> RAID. Both postgres start correctly, but the changes one postgres does, are
> not noticed by the second one.

This will not work; don't even think of trying it, unless you want to
corrupt your database beyond repair.

Postgres depends on shared-memory communication among backends, not only
on disk files, so there is no chance of making this work.
        regards, tom lane