pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
old and new pg_controldata WAL segment sizes are invalid or do not match
3+ messages / 3 participants
[nested] [flat]

* old and new pg_controldata WAL segment sizes are invalid or do not match
@ 2020-06-17 21:05  ram pratap maurya <rampratap0000@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: ram pratap maurya @ 2020-06-17 21:05 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hello taem,

i am faction issue during upgrade postgres11 to 12. can you please suggest
how to resolve this issue.

..........................................................................................................................
bash-4.1$ /usr/pgsql-12/bin/pg_upgrade --old-datadir
/var/lib/pgsql/11/data/ --new-datadir /var/lib/pgsql/12/data/ --old-bindir
/usr/pgsql-11/bin/ --new-bindir /usr/pgsql-12/bin/ --check
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok

old and new pg_controldata WAL segment sizes are invalid or do not match
Failure, exiting


regards,
ram Pratap

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: old and new pg_controldata WAL segment sizes are invalid or do not match
@ 2020-06-17 21:36  Jerry Sievers <gsievers19@comcast.net>
  parent: ram pratap maurya <rampratap0000@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Jerry Sievers @ 2020-06-17 21:36 UTC (permalink / raw)
  To: ram pratap maurya <rampratap0000@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org

ram pratap maurya <rampratap0000@gmail.com> writes:

> Hello taem,
>
> i am faction issue during upgrade postgres11 to 12. can you please
> suggest how to resolve this issue.
>
> ..........................................................................................................................
> bash-4.1$ /usr/pgsql-12/bin/pg_upgrade --old-datadir /var/lib/pgsql/
> 11/data/ --new-datadir /var/lib/pgsql/12/data/ --old-bindir /usr/
> pgsql-11/bin/ --new-bindir /usr/pgsql-12/bin/ --check
> Performing Consistency Checks
> -----------------------------
> Checking cluster versions                                   ok
>
> old and new pg_controldata WAL segment sizes are invalid or do not
> match
> Failure, exiting

Did you initdb the v12 cluster with a non-default WAL size?

Suggest you run pg_controldata for both old/new clusters and see what it
says, which the pg_upgrade error message is telling you to do.

HTH

>
>
> regards,
> ram Pratap
>
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: old and new pg_controldata WAL segment sizes are invalid or do not match
@ 2020-06-18 09:45  Paul Förster <paul.foerster@gmail.com>
  parent: ram pratap maurya <rampratap0000@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Paul Förster @ 2020-06-18 09:45 UTC (permalink / raw)
  To: ram pratap maurya <rampratap0000@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-06-18 09:45 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 21:05 old and new pg_controldata WAL segment sizes are invalid or do not match ram pratap maurya <rampratap0000@gmail.com>
2020-06-17 21:36 ` Jerry Sievers <gsievers19@comcast.net>
2020-06-18 09:45 ` Paul Förster <paul.foerster@gmail.com>

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