ON COMMIT temp table handling

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mike Mascari <mascarm(at)mascari(dot)com>, swm(at)linuxworld(dot)com(dot)au
Subject: ON COMMIT temp table handling
Date: 2002-11-09 23:52:48
Message-ID: 200211092352.gA9Nqmr01805@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Gavin, I have applied your patch for ON COMMIT temp table handling;
attached. I had a few problems:

o The code has drifted since last August, so I had to apply
some of it by hand.

o I did some reformatting of the brackets for consistency.

o Your code in cluster.c called heap_create_with_catalog() using:

isTempNamespace(RelationGetNamespace(OldHeap)),

which returns a boolean, and passes it as the value for 'ateoxact',
which is not a boolean. This call is used to create the new heap file
for the cluster operation. I changed it to ATEOXACTNOOP.

o Your handling of the temprels List was incorrect. You can't use
foreach() to traverse a List when you are removing entries from the
list. (The loop variable pointer is removed and causes havoc.) I
changed the loop to while() and added the necessary loop control
statements. I thought you used my temprel.c code for this. It had the
proper control statements. Did you remove them by mistake:

http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/cache/Attic/temprel.c

Regression tests and initdb pass.

---------------------------------------------------------------------------

pgman wrote:
>
> OK, I will save this for 7.4. Sorry, Gavin. I missed this one for 7.3.
>
> ---------------------------------------------------------------------------
>
> pgman wrote:
> > Tom Lane wrote:
> > > Mike Mascari <mascarm(at)mascari(dot)com> writes:
> > > > Bruce wrote:
> > > > "Yes, someone from India has a project to test LRU-K and MRU for
> > > > large table scans and report back the results. He will
> > > > implement whichever is best."
> > > > Did this make it into 7.3?
> > >
> > > No, we never heard back from that guy. It is still a live topic though.
> > > One of the Red Hat people was looking at it over the summer, and I think
> > > Neil Conway is experimenting with LRU-2 code right now.
> > >
> > > > 2. Gavin Sherry had worked up a patch so that temporary
> > > > relations could be dropped automatically upon transaction
> > > > commit. Did any of those patches it make it?
> > >
> > > No they didn't; I forget whether there was any objection to his last try
> > > or it was just too late to get reviewed before feature freeze.
> >
> > I see it going into the patch queue. Here is the full thread:
> >
> > http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=200208272124.g7RLO1L20172%40candle.pha.pa.us&rnum=1&prev=/groups%3Fq%3Dcreate%2Btemp%2Btable%2Bon%2Bcommit%2Bgroup:comp.databases.postgresql.*%26hl%3Den%26lr%3D%26ie%3DUTF-8%26scoring%3Dd%26selm%3D200208272124.g7RLO1L20172%2540candle.pha.pa.us%26rnum%3D1
> >
> > I don't see why it wasn't applied.
> >
> > --
> > Bruce Momjian | http://candle.pha.pa.us
> > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> > + If your life is a hard drive, | 13 Roberts Road
> > + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 23.4 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-11-10 00:09:48 Re: tweak CREATE SEQUENCE grammar
Previous Message Joe Conway 2002-11-09 16:42:15 Re: one last patch - array lower and upper bound