Обсуждение: TupleDesc refcounting, again

Поиск
Список
Период
Сортировка

TupleDesc refcounting, again

От
Tom Lane
Дата:
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