Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size

Nathan Bossart <bossartn@amazon.com>

From: "Bossart, Nathan" <bossartn@amazon.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Jeremy Schneider <schneider@ardentperf.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael.paquier@gmail.com>, Andres Freund <andres@anarazel.de>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2018-03-14T00:53:08Z
Lists: pgsql-hackers

Attachments

Here is a new set of patches that addresses most of Peter's feedback.
I've split it into four pieces:

  0001: Fix division-by-zero error in pg_controldata
  0002: Fix division-by-zero error in pg_resetwal
  0003: Allow users to specify WAL segment size in pg_resetwal
  0004: Add long options to pg_resetwal (including --wal-segsize)

On 3/3/18, 12:22 PM, "Peter Eisentraut" <peter.eisentraut@2ndquadrant.com> wrote:
> The patch "Configurable file mode mask" contains the beginning of a test
> suite for pg_resetwal.  It would be great if we could get a test case
> for this new functionality implemented.

I haven't added a test case yet, as this thread [0] seems to still be
in-progress.

Nathan

[0] https://postgr.es/m/ad346fe6-b23e-59f1-ecb7-0e08390ad629%40pgmasters.net

Commits

  1. pg_resetwal: Prevent division-by-zero errors

  2. Make WAL segment size configurable at initdb time.