Re: Minor DROP TABLESPACE issue - Mailing list pgsql-hackers

From Gavin Sherry
Subject Re: Minor DROP TABLESPACE issue
Date
Msg-id Pine.LNX.4.58.0406191145570.11676@linuxworld.com.au
Whole thread Raw
In response to Re: Minor DROP TABLESPACE issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Minor DROP TABLESPACE issue
List pgsql-hackers
On Fri, 18 Jun 2004, Tom Lane wrote:

> Gavin Sherry <swm@linuxworld.com.au> writes:
> > Is it really that bad? NamespaceCreate() could just touch a file at
> > pg_tablespaces/<tablespaceoid>/<MyDatabaseId>/<namespace oid> and
> > RemoveSchema() could remove it.
>
> No, because that wouldn't be rollback-safe.  You'd have to make the
> placeholder file act enough like a real relation that the smgr
> delete-at-commit-or-abort mechanisms could handle it.  So then you
> have to buy into not having its name actually collide with any real
> relations, which is where I started feeling like I didn't want to
> pursue that solution.
>
> This is certainly doable in theory, it just seems like much more
> complexity than the problem is worth ...

Oh yeah... I forgot about OID wrap around issues and integration into WAL,
etc, wouldn't be great fun.

If we just wanted to make the error message more user friendly, perhaps we
could *gulp* store the tablespace name in PG_VERSION. Then again, all of
this can probably be handled better in the manual.

Gavin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Minor DROP TABLESPACE issue
Next
From: Tom Lane
Date:
Subject: Re: Minor DROP TABLESPACE issue