Re: Tablespace permissions issue

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tablespace permissions issue
Date: 2004-06-28 15:35:29
Message-ID: Pine.LNX.4.58.0406281721110.2127@sablons.cri.ensmp.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Dear Tom,

> BTW, it occurs to me that there's a bug in the current implementation of
> CREATE DATABASE when you change the database's default tablespace.
> [...]
> Now, when looking at the new database's reltablespace column, it will
> appear that that table is in the old database's default tablespace ...
> but that ain't where CREATE DATABASE put it. Ooops.
>
> Thoughts?

I submitted a patch 3 weeks ago so as to update the namespace ownership
wrt the database owner on the first connexion to a database.

It seems to me that you need just the very same hook for housekeeping
stuff after "create database": that would not avoid the problem, but at
least fix the information before it is used. I'm not sure it is that easy
to check for the table space of a table... But as it is just a newly
created database, maybe we can simply assume that all tables are in the
new database "default" tablespace, so the update is really simple?

It's more a "fix-me later" approach, but it does not look that bad, IMHO.

--
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Overholt 2004-06-28 15:44:31 Re: recursive SQL
Previous Message Tom Lane 2004-06-28 14:57:47 Re: Tablespace permissions issue