From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Euler Taveira <euler(at)eulerto(dot)com> |
Subject: | Re: Executing pg_createsubscriber with a non-compatible control file |
Date: | 2025-10-07 18:51:45 |
Message-ID: | CAD21AoBYh_SS1LiYH-7JRupTveztSbA_QiG6JAF2xgzMCmtKJA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Oct 5, 2025 at 9:19 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> Hi all,
> (Adding Euler in CC.)
>
> I have mentioned that on this thread:
> https://www.postgresql.org/message-id/aOM-T6iojyzb7OVB@paquier.xyz
>
> Attempting to execute pg_createsubscriber compiled with a version of
> PG_CONTROL_VERSION incompatible with the standby we want to switch to
> a logical replica leads to the following error:
> $ pg_createsubscriber -D $HOME/data/5433 \
> -P "host=/tmp port=5432" -d postgres
> pg_createsubscriber: error: control file appears to be corrupt
>
> For example, setup a cluster based on v17 and run the command. This
> is confusing, because the control file is not corrupted,
> pg_createsubscriber is just missing the fact that the major version it
> is compiled with is not able to manipulate the control file of the
> target data folder. We enforce such checks for other tools, like
> pg_checksums or pg_rewind, and I don't see why pg_createsubscriber
> should be an exception?
+1 to add a major version check for better log messages.
Just to be clear, did you mean that pg_checksums and pg_rewind already
do such checks? IIUC pg_checksums does CRC check for the control file,
and if we execute v18-pg_checksums against v17-cluster we end up with
a similar error but with a different log message like "pg_checksums:
error: pg_control CRC value is incorrect". Those log messages are not
helpful either.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2025-10-07 19:01:25 | Re: Add mode column to pg_stat_progress_vacuum |
Previous Message | Andres Freund | 2025-10-07 18:47:17 | Re: split func.sgml to separated individual sgml files |