Re: Traffic jams in fn_extra

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul Ramsey <pramsey(at)cleverelephant(dot)ca>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Traffic jams in fn_extra
Date: 2013-11-20 03:32:20
Message-ID: 30750.1384918340@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Paul Ramsey <pramsey(at)cleverelephant(dot)ca> writes:
> As we've added different kinds of caching, in our own project, we've banged up against problems of multiple functions trying to stuff information into the same pointer, and ended up putting an extra container of our own into fn_extra, to hold the different kinds of stuff we might want to store, a GenericCacheCollection

TBH, I fail to understand what you're on about here. Any one function
owns the value of fn_extra in calls to it, and is solely responsible for
its usage; furthermore, there's no way for any other code to mangle that
pointer unless the owner explicitly makes it available. So where is
the problem? And if there is a problem, how does adding another field
of exactly the same kind make it better?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-20 03:38:39 Re: Clang 3.3 Analyzer Results
Previous Message Tom Lane 2013-11-20 03:24:19 Re: Turning recovery.conf into GUCs