Re: Traffic jams in fn_extra - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Traffic jams in fn_extra
Date
Msg-id CA+U5nMKXFLh5n45KGwGVMzMKvwDxavYePdSqwZp=XCCyawwuBA@mail.gmail.com
Whole thread Raw
In response to Re: Traffic jams in fn_extra  (Paul Ramsey <pramsey@cleverelephant.ca>)
Responses Re: Traffic jams in fn_extra  (Paul Ramsey <pramsey@cleverelephant.ca>)
Re: Traffic jams in fn_extra  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On 19 November 2013 23:08, Paul Ramsey <pramsey@cleverelephant.ca> wrote:

> On the solution, I wasn't suggesting another void* slot, but rather a
> slot that holds a hash table, so that an arbitrary number of things
> can be stuffed in. Overkill, really, since in 99.9% of times only one
> thing would be in there, and in the other 0.1% of times two things. In
> our own GenericCacheCollection, we just statically allocate 16 slots.

Why do you need to do this dance with fn_extra?

It's possible to allocate a hash table in a Transaction-lifetime
memory context on first call into a function then cache things there.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Completing PL support for Event Triggers
Next
From: Pavel Stehule
Date:
Subject: Re: review - pg_stat_statements