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

From Tom Lane
Subject Re: Minor DROP TABLESPACE issue
Date
Msg-id 5807.1087608977@sss.pgh.pa.us
Whole thread Raw
In response to Re: Minor DROP TABLESPACE issue  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Re: Minor DROP TABLESPACE issue
List pgsql-hackers
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 ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: email browser?
Next
From: Gavin Sherry
Date:
Subject: Re: Minor DROP TABLESPACE issue