From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Michael Nolan *EXTERN* <htfoot(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: problem/bug in drop tablespace? |
Date: | 2012-05-12 02:58:16 |
Message-ID: | 1336791206-sup-780@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Excerpts from Robert Haas's message of vie may 11 20:28:28 -0400 2012:
> On Fri, May 11, 2012 at 7:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > A larger question is whether we should start making pg_shdepend entries
> > for table/index usage of non-default tablespaces, so that you couldn't
> > DROP a tablespace that the catalogs think still has tables/indexes in
> > it.
>
> I'm astonished we don't do that already. Seems inconsistent with
> other SQL object types - most obviously, schemas - and a potentially
> giant foot-gun.
The original patch did contain tablespace tracking (though I don't
remember considering whether they were default or not), but it got
ripped out because during the subsequent discussion we considered that
it wasn't necessary to keep track of it -- supposedly, whenever you were
going to delete a tablespace, the existing files in the directory would
be sufficient evidence to stop the deletion. Evidently I failed to
consider the case at hand.
I don't think there's any particular reason we can't put it back.
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-05-12 03:03:05 | Re: problem/bug in drop tablespace? |
Previous Message | Robert Haas | 2012-05-12 00:37:58 | Re: Draft release notes complete |