Re: Custom explain options

Поиск
Список
Период
Сортировка
От Andrei Lepikhov
Тема Re: Custom explain options
Дата
Msg-id 7ec74d8a-809b-4fac-884a-96ea6a96735c@postgrespro.ru
обсуждение исходный текст
Ответ на Custom explain options  (Konstantin Knizhnik <knizhnik@garret.ru>)
Ответы Re: Custom explain options  (Konstantin Knizhnik <knizhnik@garret.ru>)
Список pgsql-hackers
On 21/10/2023 19:16, Konstantin Knizhnik wrote:
> EXPLAIN statement has a list of options (i.e. ANALYZE, BUFFERS, 
> COST,...) which help to provide useful details of query execution.
> In Neon we have added PREFETCH option which shows information about page 
> prefetching during query execution (prefetching is more critical for Neon
> architecture because of separation of compute and storage, so it is 
> implemented not only for bitmap heap scan as in Vanilla Postgres, but 
> also for seqscan, indexscan and indexonly scan). Another possible 
> candidate  for explain options is local file cache (extra caching layer 
> above shared buffers which is used to somehow replace file system cache 
> in standalone Postgres).
> 
> I think that it will be nice to have a generic mechanism which allows 
> extensions to add its own options to EXPLAIN.

Generally, I welcome this idea: Extensions can already do a lot of work, 
and they should have a tool to report their state, not only into the log.
But I think your approach needs to be elaborated. At first, it would be 
better to allow registering extended instruments for specific node types 
to avoid unneeded calls.
Secondly, looking into the Instrumentation usage, I don't see the reason 
to limit the size: as I see everywhere it exists locally or in the DSA 
where its size is calculated on the fly. So, by registering an extended 
instrument, we can reserve a slot for the extension. The actual size of 
underlying data can be provided by the extension routine.

-- 
regards,
Andrei Lepikhov
Postgres Professional




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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: should check collations when creating partitioned index
Следующее
От: Pavel Stehule
Дата:
Сообщение: possibility to define only local cursors