Re: [HACKERS] [COMMITTERS] pgsql: Make WAL segment size configurableat initdb time. - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] [COMMITTERS] pgsql: Make WAL segment size configurableat initdb time.
Date
Msg-id CA+TgmoZqGj4Dz3zt=1Cp7SaXkyiZV+dZQit=AXSHwtGniWZL5g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [COMMITTERS] pgsql: Make WAL segment size configurable at initdb time.  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Wed, Sep 20, 2017 at 1:51 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> I have been reading through this commit, and there is one change in
> streamutil.c which is really unwelcome:
> +   /* for previous versions set the default xlog seg size */
> +   if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_SHOW_CMD)
> +   {
> +       WalSegSz = DEFAULT_XLOG_SEG_SIZE;
> +       return true;
> +   }
> Because of this pg_receivewal will generate silently incorrect WAL
> segment data if connecting with builds of PostgreSQL 10 or older
> versions which do not have the default segment size of 16MB set. If
> this patch justifies such breakages, I think that this should just
> fail instead to tell users that it is better to use an older version
> of pg_receivewal compatible with the build of this server. Better safe
> than sorry.

I don't think this commit made anything any worse.  Before this
commit, the client used XLOG_SEG_SIZE anyway.  There was already no
guarantee that the value compiled into the client matched the value
compiled into the server to which it was connecting.  The difference
is, now we only assume that when the server is too old to tell us the
real answer, whereas before, we assumed it always.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Page Scan Mode in Hash Index
Next
From: Stephen Frost
Date:
Subject: Re: [GENERAL] [HACKERS] USER Profiles for PostgreSQL