From: | Rob Emery <re-pgsql(at)codeweavers(dot)net> |
---|---|
To: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | pg_upgrade + replica servers + rsync --size-only is unsafe |
Date: | 2020-12-02 16:18:56 |
Message-ID: | CAPCETpv6esrADG8koCxzwUWAz4iJCjKt4aCcdZS09mB-y9TwsQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hiya,
We're pretty sure that we've just hit a scenario where the instructions for
pg_upgrade with standby servers aren't quite safe.
We were testing our upgrade process with a copy of our live cluster in a
lab environment and we found that using
rsync --verbose --archive --delete --hard-links --size-only
--no-inc-recursive /media/postgresql/data/main /media/postgresql/data/9.6
PGRETESTA02:/media/postgresql/data
Resulted in:
2020-12-02 14:49:11.513 GMT [20884-1] LOG: database system was shut
down in recovery at 2020-12-02 13:57:56 GMT
2020-12-02 14:49:11.513 GMT [20884-2] LOG: entering standby mode
2020-12-02 14:49:11.557 GMT [20884-3] LOG: consistent recovery state
reached at 19E/25000098
2020-12-02 14:49:11.557 GMT [20884-4] LOG: invalid record length at
19E/25000098: wanted 24, got 0
2020-12-02 14:49:11.559 GMT [20883-1] LOG: database system is ready
to accept read only connections
2020-12-02 14:49:11.593 GMT [20888-1] FATAL: database system
identifier differs between the primary and standby
2020-12-02 14:49:11.593 GMT [20888-2] DETAIL: The primary's
identifier is 6901669428825624285, the standby's identifier is
690161835164
1138930.
however if we don't use --size-only, then the process worked fine and we a
smooth upgrade.
I think the documentation should be updated to not have --size-only?
I've had a look and I can see concerns around this when it was originally
added:
https://www.postgresql.org/message-id/20150123030509.GJ3854@tamriel.snowman.net
Thanks,
Rob
--
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2020-12-02 17:28:05 | Re: pg_upgrade + replica servers + rsync --size-only is unsafe |
Previous Message | hubert depesz lubaczewski | 2020-12-01 13:38:45 | Re: killing idle_connections |