Re: Modify pg_stat_get_activity to build a tuplestore

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Modify pg_stat_get_activity to build a tuplestore
Дата
Msg-id 20150508135848.GJ2523@alvh.no-ip.org
обсуждение исходный текст
Ответ на Modify pg_stat_get_activity to build a tuplestore  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Modify pg_stat_get_activity to build a tuplestore  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Stephen Frost wrote:

> As I mentioned on another thread, you're certainly right about that, and
> here's the first broken-out patch, which just changes
> pg_stat_get_activity to build and return a tuplestore in a single
> function call instead of using the old-style multiple-invokation call
> method.  Given the simplicity and the lack of any user-visible change,
> and that it's an independently useful change regardless of what happens
> with the other changes, I'm planning to move forward with this pretty
> quickly, barring concerns, of course.

Um.  Abhijit mentioned to me the idea of implementing function execution
code in fmgr that would allow for calling functions lazily (i.e. stop
calling it once enough rows have been returned).  One of the reasons not
to do that is that most functions use the materialize mode rather than
value-per-call, so the optimization is pointless because the whole
result is computed anyway.  If we change more functions to materialize,
we will make that sort of optimization even more distant.

What is the reason for this change anyway?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Remove obsolete mention of src/tools/backend
Следующее
От: Bernd Helmle
Дата:
Сообщение: Re: Disabling trust/ident authentication configure option