pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Förster <paul.foerster@gmail.com>
To: ram pratap maurya <rampratap0000@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: old and new pg_controldata WAL segment sizes are invalid or do not match
Date: Thu, 18 Jun 2020 11:45:47 +0200
Message-ID: <AB36E2E4-BBD3-4288-9AC9-E80C1E5869DD@gmail.com> (raw)
In-Reply-To: <CAAiDzSeEEfhxjfT-v+DDySHnfB7N9y_QezQizuRV8RKQ0LDGSg@mail.gmail.com>
References: <CAAiDzSeEEfhxjfT-v+DDySHnfB7N9y_QezQizuRV8RKQ0LDGSg@mail.gmail.com>

Hi ram,

> On 17. Jun, 2020, at 23:05, ram pratap maurya <rampratap0000@gmail.com> wrote:
> old and new pg_controldata WAL segment sizes are invalid or do not match
> Failure, exiting

delete the *new* PostgreSQL cluster (it should be empty anyway) and reinitialize it setting the wal-segsize to the same as the old cluster:

$ initdb --wal-segsize=<size> ...

(see https://www.postgresql.org/docs/current/app-initdb.html)

Then perform the upgrade as you tried before.

After that, you can, if you want, reset the size to a new one using pg_resetwal. But make sure you first do a really clean backup!

$ pg_resetwal --wal-segsize=<new_size> ...
(see https://www.postgresql.org/docs/current/app-pgresetwal.html)

But know what you're doing! Try on a test database first to see how it works.

Cheers,
Paul




view thread (3+ messages)

Message-ID: <AB36E2E4-BBD3-4288-9AC9-E80C1E5869DD@gmail.com>
Permalink:  ../AB36E2E4-BBD3-4288-9AC9-E80C1E5869DD@gmail.com/
Also on:    postgresql.org/message-id/AB36E2E4-BBD3-4288-9AC9-E80C1E5869DD@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: paul.foerster@gmail.com, rampratap0000@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: old and new pg_controldata WAL segment sizes are invalid or do not match
  In-Reply-To: <AB36E2E4-BBD3-4288-9AC9-E80C1E5869DD@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox