Re: min_wal_size > max_wal_size is accepted

From: Marc Rechté <marc4(at)rechte(dot)fr>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: min_wal_size > max_wal_size is accepted
Date: 2020-05-07 13:18:23
Message-ID: 9b2cd7f0-a744-5b10-87e5-b3ebdbbf2d9f@rechte.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Hi,
>
> Le jeu. 7 mai 2020 à 11:13, Marc Rechté <marc4(at)rechte(dot)fr
> <mailto:marc4(at)rechte(dot)fr>> a écrit :
>
> Hello,
>
> It is possible to startup an instance with min > max, without the
> system
> complaining:
>
> mrechte=# show min_wal_size ;
>
> 2020-05-07 11:12:11.422 CEST [11098] LOG:  durée : 0.279 ms
>
>   min_wal_size
>
> --------------
>
>   128MB
>
> (1 ligne)
>
>
>
> mrechte=# show max_wal_size ;
>
> 2020-05-07 11:12:12.814 CEST [11098] LOG:  durée : 0.275 ms
>
>   max_wal_size
>
> --------------
>
>   64MB
>
> (1 ligne)
>
>
> This could be an issue ?
>
>
> I don't see how this could be an issue. You'll get a checkpoint every
> time 64MB have been written before checkpoint_timeout kicked in. And WAL
> files will be removed if you have more than 128MB of them.
>
> Not the smartest configuration, but not a damaging one either.
>
>
> --
> Guillaume.

I have some doubts when I see such code in
backend/access/transam/xlog.c:2334

if (recycleSegNo < minSegNo)

recycleSegNo = minSegNo;

if (recycleSegNo > maxSegNo)

recycleSegNo = maxSegNo;

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-05-07 13:21:31 Re: PG compilation error with Visual Studio 2015/2017/2019
Previous Message Bruce Momjian 2020-05-07 13:09:20 Re: PG 13 release notes, first draft