what i was trying to do was maintain an array of Buffer pool clusters.
What i did previously was change the pointers around in the freelist so
instead of one i have 4. Now each buffer pool is called a BP cluster.
Within this BP cluster i have things like cluster id, freelist descriptor
etc, and a linked list that holds all the relation id's belonging to that
cluster (right now it does this randomly but we will change this to
grouping according to access patterns). Every time i call
RelationBuildDesc from relcache.c, i randomly assign a cluster id and put
the relation id in the cluster. And every time i want to remove the
relation from the BP i will have to remove it from the linked list of
relation ids. I know that this implementation will not work well for
multi database systems, but this is just the first step of this work.
So what is happening is that i enter the relation ids into the BP cluster
linked list fine and every time i call psql, it automatically deletes.
hope i gave u a better explanation
On Thu, 19 Jun 2003, Bruno Wolff III wrote:
> On Thu, Jun 19, 2003 at 17:07:43 -0400,
> Nailah Ogeer <ogeer@cs.queensu.ca> wrote:
>
> Please don't respond to other messages to start a new thread.
>
> > What i am trying to do is to maintain a linked list of all the relations
> > in a database. When i create a db then i want it to insert into the linked
> > list the relation ids. As it stands now, i can create a db fine and i see
> > the relation id's in the linked list. BUT, as soon as i psql into the db
> > then they all disappear. I maintain an array that stores the linked lists
> > which i initialized in buf_init.
> > I don't understand this. Can someone explain why? Is it wiping out the
> > array i initialized before.
>
> You might be better off explaining to us what you are really trying to
> do. Information about relations is already in the system catalogs.
> Using a linked list in a relation database doesn't work very well.
>