Re: Can Postgres 8.x start if some disks containing tablespaces are not mounted?

From: "Morris Goldstein" <morris(dot)x(dot)goldstein(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Zdenek Kotala" <Zdenek(dot)Kotala(at)sun(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Can Postgres 8.x start if some disks containing tablespaces are not mounted?
Date: 2008-04-02 18:42:08
Message-ID: 41b6f5c20804021142s2675dd3dg3fc0ac4729c9cfab@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, Apr 2, 2008 at 10:55 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Morris Goldstein" <morris(dot)x(dot)goldstein(at)gmail(dot)com> writes:
>
> > Without going into a lot of details about our application, I'll just
> > say that the ability to start Postgres with just the "startup schema"
> > present is incredibly useful. On a SAN, we put this startup schema
> > on a volume that is permanently bound to a node, and the other schema
> > on a volume that can fail over to another node. Tablespaces allow us
> > to start Postgres and then fail back the volume containing the second
> > schema.
>
> [ retrieves eyebrows from ceiling... ] Have you actually tested this?
> It sounds to me like you are thinking you can reattach the tablespace
> to a different database instance, which is guaranteed not to work.
> You've got to fail over the entire instance as a whole.

No, nothing like that. Node1 has a database. Let's say that pg_data is
on /dev/sda and the database hasa tablespace on /dev/sdb. node1
fails. /dev/sdb is actually a SAN volume, and can fail over to another
node, node2. /dev/sdb2 also has non-postgres data that node2 needs.
When the failover happens, node2 uses the non-postgres data and leaves
the postgres data alone. node1 restarts. Postgres restarts and, as
long as it doesn't refer to the /dev/sdb tablespace, my understanding
is that everything is OK. Eventually, /dev/sdb fails back to node1,
and at that point references to the tablespace on that volume should
work.

(Why not give postgres its own volumes? Long and not very interesting story.)

None of this is implemented -- I'm checking out the issues here as
part of a design task. I'm not using autovacuum, and the only other
issue I've turned up is references to the tablespace on /dev/sdb from
the WAL.

Morris

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brent Wood 2008-04-02 18:43:05 Re: (FAQ?) JOIN condition - 'WHERE NULL = NULL'
Previous Message Peter Eisentraut 2008-04-02 18:28:00 Re: [GENERAL] SHA1 on postgres 8.3

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-02 19:21:02 Re: Patch queue -> wiki (was varadic patch)
Previous Message Peter Eisentraut 2008-04-02 18:28:00 Re: [GENERAL] SHA1 on postgres 8.3