From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
Cc: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Jan Wieck <JanWieck(at)yahoo(dot)com>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Big 7.1 open items |
Date: | 2000-06-16 23:16:37 |
Message-ID: | 9271.961197397@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
"Ross J. Reedstrom" <reedstrm(at)rice(dot)edu> writes:
> I think the backend needs a per table token that indicates how
> to get at the physical bits of the file. Whether that's a filename
> alone, filename with path, oid, key to a smgr hash table or something
> else, it's opaque above the smgr routines.
Except to the commands that provide the user interface for tablespaces
and so forth. And there aren't all that many places that deal with
physical filenames anyway. It would be a good idea to try to be a
little stricter about this, but I'm not sure you can make the separation
a whole lot cleaner than it is now ... with the exception of the obvious
bogosities like "rename table" being done above the smgr level. (But,
as I said, I want to see that code go away, not just get moved into
smgr...)
> Hmm, now I'm thinking, since the tablespace discussion has been reopened,
> the way to go about coding all this is to reactivate the smgr code: how
> about I leave the existing md smgr as is, and clone it, call it md2 or
> something, and start messing with adding features there?
Um, well, you can't have it both ways. If you're going to change/fix
the assumptions of code above the smgr, then you've got to update md
at the same time to match your new definition of the smgr interface.
Won't do much good to have a playpen smgr if the "standard" one is
broken.
One thing I have been thinking would be a good idea is to take the
relcache out of the bufmgr/smgr interfaces. The relcache is a
higher-level concept and ought not be known to bufmgr or smgr; they
ought to work with some low-level data structure or token for relations.
We might be able to eliminate the whole concept of "blind write" if we
do that. There are other problems with the relcache dependency: entries
in relcache can get blown away at inopportune times due to shared cache
inval, and it doesn't provide a good home for tokens for multiple
"versions" of a relation if we go with the fill-a-new-physical-file
approach to CLUSTER and so on.
Hmm, if you replace relcache in the smgr interfaces with pointers to
an smgr-maintained data structure, that might be the same thing that
you are alluding to above about an smgr hash table.
One thing *not* to do is add yet a third layer of data structure on
top of the ones already maintained in fd.c and md.c. Whatever extra
data might be needed here should be added to md.c's tables, I think,
and then the tokens used in the smgr interface would be pointers into
that table.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Randall Parker | 2000-06-16 23:18:23 | Re: Re: Big 7.1 open items |
Previous Message | Hiroshi Inoue | 2000-06-16 23:11:08 | RE: Big 7.1 open items |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-06-16 23:30:25 | Re: Big 7.1 open items |
Previous Message | Hiroshi Inoue | 2000-06-16 23:11:08 | RE: Big 7.1 open items |