Skip site navigation (1) Skip section navigation (2)

Re: TupleDesc refcounting

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: TupleDesc refcounting
Date: 2006-01-17 14:36:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Neil Conway <neilc(at)samurai(dot)com> writes:
> ... However, since we're primarily
> concerned with TupleDescs allocated in CacheMemoryContext and that
> context is never reset, we can use the reference count *just* to manage
> the "external" references to TupleDescs. That should make the patch far
> less invasive. (I have the feeling you've been suggesting this all
> along, I've just been too thick-skulled to understand you.)

Actually, what I've been thinking about is applying reference counting
only to the specific tupdescs that need it --- which at this point is
really only the ones in the typcache, though we might later extend the
use of the facility to other places.  I suspect you'll find that it's
convenient to treat typcache's own link to a tupdesc as a reference
count too, so it's not strictly "external" references that should be
counted.  The point is that we don't need to force all the code into
that same mold, especially not all at once.

> I'll hopefully have a patch implementing this finished by tomorrow
> evening.

OK.  I'm going to go ahead and develop a non-refcount patch (copy
tupdescs where needed) to put into the back branches.  I won't apply it
to HEAD unless you say so, though, as I'm sure it'd create a merge
problem for you.

			regards, tom lane

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2006-01-17 20:51:18
Subject: Re: Huge number of disk writes after migration to 8.1
Previous:From: Neil ConwayDate: 2006-01-17 07:00:12
Subject: Re: TupleDesc refcounting

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group