Re: WIP: Avoid creation of the free space map for small tables

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: WIP: Avoid creation of the free space map for small tables
Дата
Msg-id CAJVSVGVDGccZy61TStidtYV67gW2qbbUyoaZ7jqo-v4s8rA6Mw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: Avoid creation of the free space map for small tables  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: WIP: Avoid creation of the free space map for small tables
Список pgsql-hackers
On 10/6/18, Thomas Munro <thomas.munro@enterprisedb.com> wrote:
> On Sat, Oct 6, 2018 at 7:47 AM John Naylor <jcnaylor@gmail.com> wrote:
>> A while back, Robert Haas noticed that the space taken up by very
>> small tables is dominated by the FSM [1]. Tom suggested that we could
>> prevent creation of the FSM until the heap has reached a certain
>> threshold size [2]. Attached is a WIP patch to implement that. I've
>> also attached a SQL script to demonstrate the change in behavior for
>> various scenarios.
>
> Hi John,
>
> You'll need to tweak the test in contrib/pageinspect/sql/page.sql,
> because it's currently asserting that there is an FSM on a small table
> so make check-world fails.

Whoops, sorry about that; the attached patch passes make check-world.
While looking into that, I also found a regression: If the cached
target block is the last block in the relation and there is no free
space, that block will be tried twice. That's been fixed as well.

Thanks,
-John Naylor

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_upgrade failed with ERROR: null relpartbound for relation18159 error.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Defaulting to password_encryption = scram-sha-256