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-12 15:40:43
Message-ID: 5148.1137080443@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> writes:
> Ah, I see what you mean. In implementing this, I wasn't sure the best
> way to provide these two sorts of TupleDesc references. My first thought
> was to add a "use ResourceOwner?" boolean parameter to the routines that
> create and destroy references to TupleDescs:

No, I wouldn't do that. I would keep the routines you mention ignorant
of ResourceOwner, because I think that the vast majority of tupdesc
usage will NOT be using ResourceOwners. Only the places where a pointer
to a cached tupdesc is handed out need to deal with this. This excludes
practically all of the executor, for instance.

If you're finding yourself writing a large and invasive patch, I think
you're doing it wrong. I'm envisioning something pretty localized.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message David Wheeler 2006-01-12 20:07:23 Re: domain constraints and UNKNOWN params
Previous Message Neil Conway 2006-01-12 10:05:46 Re: TupleDesc refcounting