"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> Now I like neither relname nor oid because it's not sufficient
> for my purpose.
We should probably not do much of anything with this issue until
we have a clearer understanding of what we want to do about
tablespaces and schemas.
My gut feeling is that we will end up with pathnames that look
(with .N attached if a segment of a large relation, of course).
The TABLESPACE "name" should likely be an OID itself, but it wouldn't
have to be if you are willing to say that tablespaces aren't renamable.
(Come to think of it, does anyone care about being able to rename
databases? ;-)) Note that the TABLESPACE will often be a symlink
to storage on another drive, rather than a plain subdirectory of the
DBNAME, but that shouldn't be an issue at this level of discussion.
I think that schemas probably don't enter into this. We should instead
rely on the uniqueness of OIDs to prevent filename collisions. However,
OIDs aren't really unique: different databases in an installation will
use the same OIDs for their system tables. My feeling is that we can
live with a restriction like "you can't store the system tables of
different databases in the same tablespace". Alternatively we could
avoid that issue by inverting the pathname order:
Note that in any case, system tables will have to live in a
predetermined tablespace, since you can't very well look in pg_class
to find out which tablespace pg_class lives in. Perhaps we should
just reserve a tablespace per database for system tables and forget
the whole issue. If we do that, there's not really any need for
the database in the path! Just
would do fine and help reduce lookup overhead.
BTW, schemas do make things interesting for the other camp:
is it possible for the same table to be referenced by different
names in different schemas? If so, just how useful is it to pick
one of those names arbitrarily for the filename? This is an advanced
version of the main objection to using the original relname and not
updating it at RENAME TABLE --- sooner or later, the filenames are
going to be more confusing than helpful.
Comments? Have I missed something important about schemas?
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2000-06-16 02:05:16|
|Subject: Re: 7.0.2 cuts off attribute name |
|Previous:||From: Haroldo Stenger||Date: 2000-06-16 01:26:28|
|Subject: Allow nested transactions|
pgsql-patches by date
|Next:||From: Bruce Momjian||Date: 2000-06-16 02:24:52|
|Subject: Re: Big 7.1 open items|
|Previous:||From: Hiroshi Inoue||Date: 2000-06-16 00:28:14|
|Subject: RE: Big 7.1 open items |