Re: [Patch v2] Make block and file size for WAL and relations definedat cluster creation

Поиск
Список
Период
Сортировка
От Remi Colinet
Тема Re: [Patch v2] Make block and file size for WAL and relations definedat cluster creation
Дата
Msg-id CADdR5nwH6zPaBBGQ_Hcd0AmDBynCAnu+iTRwpasKhXna0RiAJw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [Patch v2] Make block and file size for WAL and relationsdefined at cluster creation  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers


2018-01-03 23:11 GMT+01:00 Alvaro Herrera <alvherre@alvh.no-ip.org>:
Remi Colinet wrote:
> Hello,
>
> This is version 2 of the patch to make the file and block sizes for WAL and
> relations, run-time configurable at initdb.

I don't think this works, since we have a rule that pallocs are
prohibited within critical section and I see that your patch changes
some stack-allocated variables to palloc'ed.  For example I think the
heap_page_prune changes should break some test or other.

Thank you for the head up.

For heap_page_prune() function, the critical section starts after the palloc() call and ends before the pfree().
Unless critical sections can be nested, we are outside such section.

For the other palloc()/pfree() uses to replace the stack allocation, either we already have palloc()/pfree() call.
The changes consist of:

-       page = (Page) palloc(BLCKSZ);
+       page = (Page) palloc(rel_blck_size);

Only one change could be suspected. This is for the async.c command.
But the change is also done outside of a critical section.


This patch is too massive to review.

I understand the point.
If the patch is clean enough and does not show any regression, I will split it into smaller parts.

Regards
Remi



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

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Proposal: Local indexes for partitioned table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256