Re: Traffic jams in fn_extra

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Traffic jams in fn_extra
Дата
Msg-id CA+U5nMKmznXz5bfFKouEMG0u8b4UkETpYH4wHbH-3CG-ck98Rg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Traffic jams in fn_extra  (Paul Ramsey <pramsey@cleverelephant.ca>)
Ответы Re: Traffic jams in fn_extra  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 24 November 2013 16:02, Paul Ramsey <pramsey@cleverelephant.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: review: create if not exists
Следующее
От: J Smith
Дата:
Сообщение: Re: Errors on missing pg_subtrans/ files with 9.3