Re: Big 7.1 open items

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Big 7.1 open items
Дата
Msg-id 4283.961600040@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Big 7.1 open items  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Big 7.1 open items  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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 makeCREATE TABLESPACE loc USING '/var/pgsql'
doln -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 domkdir /var/pgsql/dbnamechmod 700
/var/pgsql/dbnameln-s /var/pgsql/dbname data/base/dbname/loc 
 
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: Big 7.1 open items
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Big 7.1 open items