Re: Minor DROP TABLESPACE issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Minor DROP TABLESPACE issue
Date: 2004-06-19 01:36:17
Message-ID: 5807.1087608977@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gavin Sherry <swm(at)linuxworld(dot)com(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-06-19 01:47:43 Re: Tablespace patch review
Previous Message Scott Marlowe 2004-06-19 01:21:07 Re: email browser?