Re: doc: BRIN indexes and autosummarize

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: doc: BRIN indexes and autosummarize
Дата
Msg-id 20220704152011.4rypgtgfu66rktkq@alvherre.pgsql
обсуждение исходный текст
Ответ на doc: BRIN indexes and autosummarize  (Roberto Mello <roberto.mello@gmail.com>)
Ответы Re: doc: BRIN indexes and autosummarize  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: doc: BRIN indexes and autosummarize  (Roberto Mello <roberto.mello@gmail.com>)
Список pgsql-hackers
On 2022-Jun-28, Roberto Mello wrote:

> Here's a patch to clarify the BRIN indexes documentation, particularly with
> regards to autosummarize, vacuum and autovacuum. It basically breaks
> down a big blob of a paragraph into multiple paragraphs for clarity,
> plus explicitly tells how summarization happens manually or
> automatically.

[Some of] these additions are wrong actually.  It says that autovacuum
will not summarize new entries; but it does.  If you just let the table
sit idle, any autovacuum run that cleans the table will also summarize
any ranges that need summarization.

What 'autosummarization=off' means is that the behavior to trigger an
immediate summarization of a range once it becomes full is not default.
This is very different.

As for the new <para></para>s that you added, I'd say they're
stylistically wrong.  Each paragraph is supposed to be one fully
contained idea; what these tags do is split each idea across several
smaller paragraphs.  This is likely subjective though.

> On this topic... I'm not familiar with with the internals of BRIN
> indexes and in backend/access/common/reloptions.c I see:
> 
>         {
>             "autosummarize",
>             "Enables automatic summarization on this BRIN index",
>             RELOPT_KIND_BRIN,
>             AccessExclusiveLock
>         },
> 
> Is the exclusive lock on the index why autosummarize is off by default?

No.  The lock level mentioned here is what needs to be taken in order to
change the value of this option.

> What would be the downside (if any) of having autosummarize=on by default?

I'm not aware of any.  Maybe we should turn it on by default.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: TAP output format in pg_regress
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Add connection active, idle time to pg_stat_activity