Re: PostgreSQL and a clustered file system - Mailing list pgsql-general

From Gunnar \"Nick\" Bluth
Subject Re: PostgreSQL and a clustered file system
Date
Msg-id 50A16181.6030608@pro-open.de
Whole thread Raw
In response to PostgreSQL and a clustered file system  (Ivan Voras <ivoras@freebsd.org>)
Responses Re: PostgreSQL and a clustered file system  (David Boreham <david_list@boreham.org>)
List pgsql-general
Am 12.11.2012 11:03, schrieb Ivan Voras:
> Hello,
>
> Is anyone running PostgreSQL on a clustered file system on Linux? By
> "clustered" I actually mean "shared", such that the same storage is
> mounted by different servers at the same time (of course, only one
> instance of PostgreSQL on only one server can be running on such a
> setup, and there are a lot of other precautions that need to be satisfied).
>
>
TBTH, I don't see the potential benefit. Clustered filesystems have
benefits for special use cases (e.g. redundant fileservers or
applications that actually can work in parallel, relying on file
locking, DB clusters that coordinate writes themselves, ...), but PG
certainly is not one of these...

I'm not even sure if PG will lock any files at all (I'd guess not, as
SHM is used for process coordination), so you'd actually have to roll
your own safety measures. OTOH, you pay a huge price for the clustering
part (google for DLM), which will slow your I/O down significantly.

If you're "just" looking for shared storage (e.g. because SAN space is
fricking expensive and you don't want to allocate it twice to your
primary and secondary server ;-), it is probably safer & performing
better to implement the  volumes and filesystems as underlying cluster
resources. That's something your cluster software should be able to
handle... ;-)

A newly imported filesystem will also not carry any leftover file locks
around, should your primary server fail. The journal replay should not
hurt you too much, as the relevant I/O PG does is sync anyway.

Just my 2p,

--
Gunnar "Nick" Bluth
RHCE/SCLA

Mobil   +49 172 8853339
Email: gunnar.bluth@pro-open.de
__________________________________________________________________________
In 1984 mainstream users were choosing VMS over UNIX.  Ten years later
they are choosing Windows over UNIX.  What part of that message aren't you
getting? - Tom Payne



pgsql-general by date:

Previous
From: salah jubeh
Date:
Subject: Re: plpgsql cursor reuse
Next
From: Jeff Janes
Date:
Subject: Re: Unexpectedly high disk space usage RESOLVED (Manual reindex/vacuum)