| From: | SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com> | 
|---|---|
| To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> | 
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: Do we need pre-allocate WAL files during end-of-recovery checkpoint? | 
| Date: | 2021-12-06 19:05:31 | 
| Message-ID: | CAHg+QDdzqphWqo_ijFiDE+XLdKuNG=BLuLHfOK+fXActKkVOJw@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
If the segment size is 16MB it shouldn't take much time but higher segment
values this can be a problem. But again, the current segment has to be
filled 75% to precreate new one. I am not sure how much we gain. Do you
have some numbers with different segment sizes?
On Mon, Dec 6, 2021 at 4:51 AM Bharath Rupireddy <
bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> Hi,
>
> The function PreallocXlogFiles doesn't get called during
> end-of-recovery checkpoint in CreateCheckPoint, see [1]. The server
> becomes operational after the end-of-recovery checkpoint and may need
> WAL files. However, I'm not sure how beneficial it is going to be if
> the WAL is pre-allocated (as PreallocXlogFiles just allocates only 1
> extra WAL file).
>
> Thoughts?
>
> [1]
>     /*
>      * An end-of-recovery checkpoint is really a shutdown checkpoint, just
>      * issued at a different time.
>      */
>     if (flags & (CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_END_OF_RECOVERY))
>         shutdown = true;
>     else
>         shutdown = false;
>
>     /*
>      * Make more log segments if needed.  (Do this after recycling old log
>      * segments, since that may supply some of the needed files.)
>      */
>     if (!shutdown)
>         PreallocXlogFiles(recptr, checkPoint.ThisTimeLineID);
>
> Regards,
> Bharath Rupireddy.
>
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bossart, Nathan | 2021-12-06 19:07:09 | Re: parse_subscription_options - suggested improvements | 
| Previous Message | Tom Lane | 2021-12-06 18:55:50 | Re: PostgreSQL server: authentication method 10 not supported |