Re: Big 7.1 open items

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Subject: Re: Big 7.1 open items
Date: 2000-06-21 15:07:20
Message-ID: 4283.961600040@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Yes, agreed. I was thinking this:
> CREATE TABLESPACE loc USING '/var/pgsql'
> does:
> ln -s /var/pgsql/dbname/loc data/base/dbname/loc
> In this way, the database has a view of its main directory, plus a /loc
> subdirectory for the tablespace. In the other location, we have
> /var/pgsql/dbname/loc because this allows different databases to use:
> CREATE TABLESPACE loc USING '/var/pgsql'
> and they do not collide with each other in /var/pgsql.

But they don't collide anyway, because the dbname is already unique.
Isn't the extra subdirectory a waste?

Because table files will have installation-wide unique names, there's
no really good reason to have either level of subdirectory; you could
just make
CREATE TABLESPACE loc USING '/var/pgsql'
do
ln -s /var/pgsql data/base/dbname/loc
and it'd still work even if multiple DBs were using the same tablespace.

However, forcing creation of a subdirectory does give you the chance to
make sure the subdir is owned by postgres and has the right permissions,
so there's something to be said for that. It might be reasonable to do
mkdir /var/pgsql/dbname
chmod 700 /var/pgsql/dbname
ln -s /var/pgsql/dbname data/base/dbname/loc

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-06-21 15:08:45 Re: Big 7.1 open items
Previous Message Zeugswetter Andreas SB 2000-06-21 15:00:44 AW: Big 7.1 open items

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2000-06-21 15:08:45 Re: Big 7.1 open items
Previous Message Bruce Momjian 2000-06-21 14:55:39 Re: Big 7.1 open items