Re: [COMMITTERS] pgsql: Make WAL segment size configurable at initdb time.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Make WAL segment size configurable at initdb time.
Date: 2017-09-20 11:57:20
Message-ID: CA+TgmoZqGj4Dz3zt=1Cp7SaXkyiZV+dZQit=AXSHwtGniWZL5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Sep 20, 2017 at 1:51 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2017-09-20 12:32:33 pgsql: Mention need for --no-inc-recursive in rsync command
Previous Message Andres Freund 2017-09-20 05:58:59 Re: [COMMITTERS] pgsql: Make WAL segment size configurable at initdb time.

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2017-09-20 12:14:05 Re: [GENERAL] USER Profiles for PostgreSQL
Previous Message Amit Kapila 2017-09-20 11:45:20 Re: Page Scan Mode in Hash Index