Fix CREATE SUBSCRIPTION failure when the publisher runs on pre-PG19. CREATE SUBSCRIPTION with copy_data=true and origin='none' previously failed when the publisher was running a version earlier than PostgreSQL 19, even though this combination should be supported.
The failure occurred because the command issued a query calling pg_get_publication_sequences function on the publisher. That function does not exist before PG19 and the query is only needed for logical replication sequence synchronization, which is supported starting in PG19. This commit fixes this issue by skipping that query when the publisher runs a version earlier than PG19. Author: Fujii Masao <[email protected]> Reviewed-by: Amit Kapila <[email protected]> Reviewed-by: Hayato Kuroda <[email protected]> Reviewed-by: Shlok Kyal <[email protected]> Discussion: https://postgr.es/m/cahgqgwex4twhtjdipwtyaxjhcbplah467sh2ajgse-41m65...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/d1b35952da0fa94329b66f8a7768c61a416c6271 Modified Files -------------- src/backend/commands/subscriptioncmds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
