Shared disk

Started by Nageshwar Raoover 21 years ago5 messagesgeneral
Jump to latest
#1Nageshwar Rao
NageshwarR@PLANETASIA.COM

Hi,
I would like to use shared disk for two Postgresql database. I mean that two
Postgresql Database point to same $PGDATA directory. Is this possible in
Postgresql Clarification is appreciated.
Thx

#2Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: Nageshwar Rao (#1)
Re: Shared disk

On Thu, Dec 09, 2004 at 09:02:51AM +0530, Nageshwar Rao wrote:

Hi,

I would like to use shared disk for two Postgresql database. I mean that two
Postgresql Database point to same $PGDATA directory. Is this possible in
Postgresql

Not at all. You can of course create two databases within one cluster
(== postmaster), but you can't have two clusters in the same data area.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"El sentido de las cosas no viene de las cosas, sino de
las inteligencias que las aplican a sus problemas diarios
en busca del progreso." (Ernesto Hern�ndez-Novich)

#3Doug McNaught
doug@mcnaught.org
In reply to: Nageshwar Rao (#1)
Re: Shared disk

Nageshwar Rao <NageshwarR@PLANETASIA.COM> writes:

Hi,

I would like to use shared disk for two Postgresql database. I mean
that two Postgresql Database point to same $PGDATA directory. Is this
possible in Postgresql Clarification is appreciated.

No, this is not possible.

You may want to look at replication solutions such as Slony-I.

-Doug

#4Chris Browne
cbbrowne@acm.org
In reply to: Nageshwar Rao (#1)
Re: Shared disk

A long time ago, in a galaxy far, far away, NageshwarR@PLANETASIA.COM (Nageshwar Rao) wrote:

I would like to use shared disk for two Postgresql database. I mean
that two Postgresql Database point to same $PGDATA directory. Is
this possible in Postgresql Clarification is appreciated.:p>

No, you can't do this, at least not if you expect the two database
processes to run at the same time.

There are High Availability systems that work in somewhat this
fashion; both servers access the same disk. But with a very precise
set of semantics:

-> The database filesystem is only mounted on one system at a time

-> The database process only runs on one system at a time

-> If the HA system detects that one server has gone down, it
"kicks" it to keep it down, and starts up services on the other
one.
--
select 'cbbrowne' || '@' || 'gmail.com';
http://linuxfinances.info/info/postgresql.html
You don't *run* programs on Ultrix.
- Mark Moraes
Right, you chase them.
- Rayan Zachariassen

#5Chris Browne
cbbrowne@acm.org
In reply to: Nageshwar Rao (#1)
Re: Shared disk

No, you can't do this, at least not if you expect the two database
processes to run at the same time.

There are High Availability systems that work in somewhat this
fashion; both servers access the same disk. But with a very precise
set of semantics:

-> The database filesystem is only mounted on one system at a time

-> The database process only runs on one system at a time

-> If the HA system detects that one server has gone down, it
"kicks" it to keep it down, and starts up services on the other
one.
--
select 'cbbrowne' || '@' || 'gmail.com';
http://linuxfinances.info/info/postgresql.html
You don't *run* programs on Ultrix.
- Mark Moraes
Right, you chase them.
- Rayan Zachariassen