Re: [HACKERS] psql

From: Nailah Ogeer <ogeer(at)cs(dot)queensu(dot)ca>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: <pgsql-general(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] psql
Date: 2003-06-20 15:00:42
Message-ID: Pine.SOL.4.33.0306201053140.17153-100000@innovate
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin pgsql-general pgsql-hackers pgsql-patches

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(at)cs(dot)queensu(dot)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.

In response to


Browse pgsql-cygwin by date

  From Date Subject
Next Message Tom Lane 2003-06-20 17:01:14 Re: [HACKERS] psql
Previous Message Bruno Wolff III 2003-06-20 01:49:56 Re: [HACKERS] psql

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-06-20 15:05:04 Re: splitting a table?
Previous Message Johnson, Shaunn 2003-06-20 14:54:12 Re: splitting a table?

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2003-06-20 15:10:43 Re: tsearch V2 (Was: Re: Two weeks to feature freeze)
Previous Message Tom Lane 2003-06-20 14:42:04 Re: Two weeks to feature freeze

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-06-20 17:01:14 Re: [HACKERS] psql
Previous Message Tom Lane 2003-06-20 14:14:58 Re: [HACKERS] Subtraction carry bug in xlog.c in 7.3 and 7.4