Andres Freund <and...@anarazel.de> writes:
> This commit unfortunately broke --wal-segsize. If I use a slightly larger than
> the default setting, I get:
> initdb --wal-segsize 64 somepath
> running bootstrap script ... 2023-03-22 13:06:41.282 PDT [639848] FATAL:  
> "min_wal_size" must be at least twice "wal_segment_size"

[ confused... ]  Oh, I see the problem.  This:

        /* set default max_wal_size and min_wal_size */
        snprintf(repltok, sizeof(repltok), "min_wal_size = %s",
                         pretty_wal_size(DEFAULT_MIN_WAL_SEGS));
        conflines = replace_token(conflines, "#min_wal_size = 80MB", repltok);

looks like it's setting a compile-time-constant value of min_wal_size;
at least that's what I thought it was doing when I revised the code.
But it isn't, because somebody had the brilliant idea of making
pretty_wal_size() depend on the wal_segment_size_mb variable.

Will fix, thanks for report.

                        regards, tom lane


Reply via email to