2018-01-03 23:11 GMT+01:00 Alvaro Herrera <alvhe...@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
>

Reply via email to