Re: refactoring relation extension and BufferAlloc(), faster COPY

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: refactoring relation extension and BufferAlloc(), faster COPY
Дата
Msg-id 20230211220413.mrbdmlmgmaqzrcff@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: refactoring relation extension and BufferAlloc(), faster COPY  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 2023-02-11 13:36:51 -0800, Andres Freund wrote:
> Even though it's not a correctness issue, it seems to me that
> DropRelationsAllBuffers() etc ought to check if the buffer is BM_TAG_VALID,
> before doing anything further.  Particularly in DropRelationsAllBuffers(), the
> check we do for each buffer isn't cheap. Doing it for buffers that don't even
> have a tag seems .. not smart.

There's a small regression for a single relation, but after that it's a clear
benefit.

32GB shared buffers, empty. The test creates N new relations and then rolls
back.

        tps        tps
num relations    HEAD        precheck
1        46.11        45.22
2        43.24        44.87
4        35.14        44.20
8        28.72        42.79

I don't understand the regression at 1, TBH.  I think it must be a random code
layout issue, because the same pre-check in DropRelationBuffers() (exercised
via TRUNCATE of a newly created relation), shows a tiny speedup.



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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: Transparent column encryption
Следующее
От: Andres Freund
Дата:
Сообщение: Re: refactoring relation extension and BufferAlloc(), faster COPY