TupleDesc refcounting, again

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: Neil Conway <neilc(at)samurai(dot)com>, "atsorgassa" <Kontakt(at)atsorgassa(dot)de>
Subject: TupleDesc refcounting, again
Date: 2006-05-19 02:32:53
Message-ID: 23860.1148005973@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Those of you with long memories may recall a discussion back in January
about reference-counting TupleDescs retrieved by lookup_rowtype_tupdesc().
I didn't like the patch Neil Conway developed for this, so I'm on the
hook to find a better answer before 8.2 comes out. I haven't forgotten
... but I was reminded of it while looking at the performance issue
pointed out by Marc Orgassa here:
http://archives.postgresql.org/pgsql-novice/2006-05/msg00153.php

If oprofile is to be trusted, Marc's second example spends something
close to forty percent of its runtime in CreateTupleDescCopy()
operations (including the subsidiary memcpy() calls). Yikes.
A reference-counting mechanism would have to be cheaper than that.

So I'll try to bubble this issue up to the top of the to-do queue
again...

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-19 03:02:44 Re: Compression and on-disk sorting
Previous Message Mark Dilger 2006-05-19 01:49:38 Re: text_position worst case runtime