I have 2 sets of publication/subscription between my 2 DBs.
One of them is working fine and the other one is stuck at initializing state for all the tables.
sourcedb=# select * from pg_publication;
oid | pubname | pubowner | puballtables | pubinsert | pubupdate | pubdelete | pubtruncate | pubviaroot
-------+------------------------+----------+--------------+-----------+-----------+-----------+-------------+------------
19585 | omx_archive_big_tables | 16420 | f | t | t | t | t | f
19584 | omx_archive | 16420 | f | t | t | t | t | f
oid | pubname | pubowner | puballtables | pubinsert | pubupdate | pubdelete | pubtruncate | pubviaroot
-------+------------------------+----------+--------------+-----------+-----------+-----------+-------------+------------
19585 | omx_archive_big_tables | 16420 | f | t | t | t | t | f
19584 | omx_archive | 16420 | f | t | t | t | t | f
targetdb=# select * from pg_subscription_rel ;
srsubid | srrelid | srsubstate | srsublsn
------------+------------+------------+---------------
3615804367 | 3322052690 | i |
3615804367 | 3322052570 | i |
3615756798 | 3322051793 | r | 9E7E/BF5F82D8
3615804367 | 3322052133 | i |
3615804367 | 3322054214 | i |
3615756798 | 3322051802 | r | 9E7E/C149BBD8
3615804367 | 3322051757 | i |
targetdb=# select * from pg_subscription;
-[ RECORD 1 ]---+----------------------------------------------------------------------------------------------------------
oid | 3615756798
subdbid | 16589
subname | sub_omx_archive_big_tables_tci
subowner | 16420
subenabled | t
subconninfo | xxx
subslotname | sub_omx_archive_big_tables_tci
subsynccommit | off
subpublications | {omx_archive_big_tables}
-[ RECORD 2 ]---+----------------------------------------------------------------------------------------------------------
oid | 3615804367
subdbid | 16589
subname | sub_omx_archive_tci
subowner | 16420
subenabled | t
subconninfo | xxxx
subslotname | sub_omx_archive_tci
subsynccommit | off
subpublications | {omx_archive}
srsubid | srrelid | srsubstate | srsublsn
------------+------------+------------+---------------
3615804367 | 3322052690 | i |
3615804367 | 3322052570 | i |
3615756798 | 3322051793 | r | 9E7E/BF5F82D8
3615804367 | 3322052133 | i |
3615804367 | 3322054214 | i |
3615756798 | 3322051802 | r | 9E7E/C149BBD8
3615804367 | 3322051757 | i |
targetdb=# select * from pg_subscription;
-[ RECORD 1 ]---+----------------------------------------------------------------------------------------------------------
oid | 3615756798
subdbid | 16589
subname | sub_omx_archive_big_tables_tci
subowner | 16420
subenabled | t
subconninfo | xxx
subslotname | sub_omx_archive_big_tables_tci
subsynccommit | off
subpublications | {omx_archive_big_tables}
-[ RECORD 2 ]---+----------------------------------------------------------------------------------------------------------
oid | 3615804367
subdbid | 16589
subname | sub_omx_archive_tci
subowner | 16420
subenabled | t
subconninfo | xxxx
subslotname | sub_omx_archive_tci
subsynccommit | off
subpublications | {omx_archive}
I have dropped the subscription, recreated and refreshed it many times, but it won't move from the initializing phase.
Any suggestions on how to start copying the data again, other than dropping the publication and re-creating it?
This correspondence (including any attachments) is for the intended recipient(s) only. It may contain confidential or privileged information or both. No confidentiality or privilege is waived or lost by any mis-transmission. If you receive this correspondence by mistake, please contact the sender immediately, delete this correspondence (and all attachments) and destroy any hard copies. You must not use, disclose, copy, distribute or rely on any part of this correspondence (including any attachments) if you are not the intended recipient(s).