Re: create tablespace fails silently, or succeeds improperly

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, Dave Cramer <pg(at)fastcrypt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: create tablespace fails silently, or succeeds improperly
Date: 2010-12-12 01:56:40
Message-ID: AANLkTim2oR98yBxBdjcWGjMqzVfxPLkdKFC9kVHKF=CV@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 11, 2010 at 1:38 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Sat, Dec 11, 2010 at 1:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> I'm not really thinking about crash recovery, but replication slaves.
>>> Omitting to create the tablespace location directories on slaves
>>> doesn't seem far-fetched at all.  Of course, it's likely that
>>> the slave server will lack permissions to create in the location
>>> directory's parent; but if it can, the outcome shouldn't be too
>>> unreasonable.
>
>> Creating the tablespace directory itself would be reasonable, but
>> recursing all the way up seems dubious.
>
> Well, it's *very* unlikely that the slave server would have permissions
> to create in the root directory or close to it.  If you grant that it's
> reasonable to create the location directory itself, why not the parent
> too, if that's still in a directory that's writable?  I agree that the
> reasonableness of the behavior drops off the more you go up, but so does
> the probability of having the needed permissions.  I don't agree that
> it's a binary choice where creating exactly one directory is reasonable
> but exactly two isn't.

I'm just giving you my opinion. Take it for what it's worth. :-)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-12-12 01:58:28 Re: function attributes
Previous Message Florian Pflug 2010-12-12 01:30:48 Problem with pg_upgrade (8.4 -> 9.0) due to ALTER DATABASE SET ROLE