Thread: Shared disk
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
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)
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
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
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