Re: Auto create (top level) directory for create tablespace

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Auto create (top level) directory for create tablespace
Date: 2007-12-16 03:28:02
Message-ID: 18897.1197775682@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Mark Kirkwood <markir(at)paradise(dot)net(dot)nz> writes:
> I thought it made sense for CREATE TABLESPACE to attempt to create the
> top level location directory -

I thought we had deliberately made it not do that. Auto-recreate during
replay sounds even worse. The problem is that a tablespace would
normally be under a mount point, and auto-create has zero chance of
getting such a path right.

Ignoring this point is actually a fine recipe for destroying your data;
see Joe Conway's report a couple years back about getting burnt by a
soft NFS mount. If the DB directory is not there, auto-creating it is
a horrible idea.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Mark Kirkwood 2007-12-16 03:56:09 Re: Auto create (top level) directory for create tablespace
Previous Message Mark Kirkwood 2007-12-15 23:19:03 Auto create (top level) directory for create tablespace