0

I have a production PostgreSQL database that replicate from publisher to subscriber using pglogical extension. My database is running on postgres 11 and I want to upgrade to postgres 14. I first upgrade the subscriber and then the publisher and start both databases but the replication fail.I have some data on the subscriber database that I do not want to loss if I have to set up a fresh copy from the publisher. My question is how can I upgrade the subscriber and publisher and still keep them in sync? thanks

upgrade subscriber first and then publisher and start both databases but replication fail

Juvette M
  • 1
  • 1
  • 3
  • With what error message does the replication fail? – jjanes Jun 02 '23 at 23:27
  • the databases (publisher and subscribers) start up as separate databases. I check the status of the subscriber and the status is down. I check the replication slot on the publisher is was no longer available – Juvette M Jun 06 '23 at 13:27
  • Look in the replica log file. It should have more to say than just "it is down". – jjanes Jun 06 '23 at 23:56
  • 2023-06-07 08:47:53 EDT,5/0,0,LOG,00000,"starting apply for subscription test_04",,,,,,,,,"pglogical apply 16404:3815206147","pglogical apply 16404:3815206147",,0 – Juvette M Jun 07 '23 at 12:53
  • ERROR,42704,"replication origin ""pgl_ateb_db_01_test_04"" does not exist",,,,,,,,,"pglogical apply 16404:3815206147","pglogical apply 16404:3815206147",,0 – Juvette M Jun 07 '23 at 12:54
  • apply worker [27139] at slot 1 generation 3 exiting with error",,,,,,,,,"pglogical apply 16404:3815206147","pglogical apply 16404:3815206147",,0 – Juvette M Jun 07 '23 at 12:54
  • LOG,00000,"background worker ""pglogical apply 16404:3815206147"" (PID 27139) exited with exit code 1",,,,,,,,,"","postmaster",,0 – Juvette M Jun 07 '23 at 12:54
  • "starting apply for subscription test_04",,,,,,,,,"pglogical apply 16404:3815206147","pglogical apply 16404:3815206147",,0 – Juvette M Jun 07 '23 at 12:54
  • ERROR,42704,"replication origin ""pgl_ateb_db_01_test_04"" does not exist",,,,,,,,,"pglogical apply 16404:3815206147","pglogical apply 16404:3815206147",,0 – Juvette M Jun 07 '23 at 12:54
  • EDT,5/0,0,LOG,00000,"apply worker [27222] at slot 1 generation 4 exiting with error",,,,,,,,,"pglogical apply 16404:3815206147","pglogical apply 16404:3815206147",,0 – Juvette M Jun 07 '23 at 12:55
  • ,00000,"background worker ""pglogical apply 16404:3815206147"" (PID 27222) exited with exit code 1",,,,,,,,,"","postmaster",,0 ^C – Juvette M Jun 07 '23 at 12:55
  • those are the errors I see in the logs on the subscriber node – Juvette M Jun 07 '23 at 12:56
  • select * from pg_replication_slots ; on publisher but replication slot still exist but the status is false – Juvette M Jun 07 '23 at 13:01
  • slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn ------------------------+------------------+-----------+--------+----------+-----------+--------+------------+------+--------------+----------------+--------------------- pgl_ateb_db_01_test_04 | pglogical_output | logical | 16404 | ateb | f | f | – Juvette M Jun 07 '23 at 13:01

0 Answers0