Re: PostgreSQL and a clustered file system

From: "Gunnar \"Nick\" Bluth" <gunnar(dot)bluth(at)pro-open(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL and a clustered file system
Date: 2012-11-12 20:52:17
Message-ID: 50A16181.6030608@pro-open.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)bluth(at)pro-open(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2012-11-12 21:02:48 Re: Enabling Autovacuum Postgres 9.1 (was Unexpectedly high disk space usage)
Previous Message salah jubeh 2012-11-12 20:52:11 Re: plpgsql cursor reuse