From: | Paul Förster <paul(dot)foerster(at)gmail(dot)com> |
---|---|
To: | ram pratap maurya <rampratap0000(at)gmail(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: old and new pg_controldata WAL segment sizes are invalid or do not match |
Date: | 2020-06-18 09:45:47 |
Message-ID: | AB36E2E4-BBD3-4288-9AC9-E80C1E5869DD@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi ram,
> On 17. Jun, 2020, at 23:05, ram pratap maurya <rampratap0000(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Pepe TD Vo | 2020-06-18 15:20:07 | Re: create batch script to import into postgres tables |
Previous Message | Jerry Sievers | 2020-06-17 21:36:31 | Re: old and new pg_controldata WAL segment sizes are invalid or do not match |