Dear Vignesh, Thanks for attaching the patch. I think there is a corner case that ALTER SERVER command changes the connection to the pre-PG19 server.
Firstly, we can create a server for connecting to the PG19 server: CREATE SERVER server ... OPTIONS (...); Then we can use the SERVER in the subscription definition: CREATE SUBSCRIPTION sub SERVER server ...; After that, we can alter the SERVER to connect to the PG18 server: ALTER SERVER server OPTION (SET dbname 'postgres' port '5434'); If users run the ALTER SUBSCRITPION REFRESH SEQUENCES command, it could succeed but the worker will raise the ERROR periodically. ``` ERROR: invalid query response DETAIL: Expected 11 fields, got 10 fields. LOG: background worker "logical replication sequencesync worker" (PID 2269290) exited with exit code 1 ``` Above can be reported because pg_get_sequence_data() has been available since PG18 but the returned datatype was different. Best regards, Hayato Kuroda FUJITSU LIMITED
