From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Paul Ramsey <pramsey(at)cleverelephant(dot)ca> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Traffic jams in fn_extra |
Date: | 2013-11-24 21:46:15 |
Message-ID: | CA+U5nMKmznXz5bfFKouEMG0u8b4UkETpYH4wHbH-3CG-ck98Rg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 24 November 2013 16:02, Paul Ramsey <pramsey(at)cleverelephant(dot)ca> wrote:
> We do the dance because it’s how we always have and don’t know any other way, any better way. :) The usual explanation. Is there any place you can point to that demonstrates your technique?
src/backend/utils/mmgr/README
You can create memory contexts as children of other contexts, so for
example you might create "PostGIS Cache Context" as a sub-context of
TopTransactionContext. So it can be created dynamically as needed and
will automatically go away at end of xact.
Or you could use CurTransactionContext if you want to do things at
subtransaction level.
This is all used very heavily within Postgres itself, including the
various caches in different parts of the code.
Obviously, if you start cacheing too much then people will claim that
PostGIS is leaking memory, so it depends how far you go. But then you
might alleviate that with a postgis.session_cache parameter to
acknowledge and allow control.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | J Smith | 2013-11-24 21:56:26 | Re: Errors on missing pg_subtrans/ files with 9.3 |
Previous Message | Pavel Stehule | 2013-11-24 21:19:11 | Re: review: create if not exists |