FTP Replicator Sync Issues

If for some reason FTP Replicator is unable to complete successfully, the LOCAL and REMOTE databases can get out of sync. In this situation, future replication attempts will fail until the databases are brought back into sync.

If you have access to PgAdmin3 on the LOCAL and REMOTE server, you can check the status tables (statuslocal and statusremote, respectively).

Open PgAdmin3 on your LOCAL server, and browse to your FTP Replication database. Expand the public schema and find the statuslocal table. This should have a single row. The attribute "running" should be FALSE, but in the case of a failure it may say TRUE.

In the SQL window run the following command:

LOCAL Server
update statuslocal set (running,status,exitstatus,nextprocess,commmode) = (FALSE, '', 0, '', '');

On the REMOTE server, repeat these steps but update the statusremote table instead:

REMOTE Server
update statusremote set (running,status,exitstatus,nextprocess,commmode) = (FALSE, '', 0, '', '');

You should then be able to run the replication from the Windows Task Scheduler, as normal.