Data exchange between 2 remote postgresql databases As per subject I'm looking into a reliable way to synchronize 2 tables that have a same structure between two remote postgresql databases.

I was thinking about dblink but an not really sure as in the places where these db's are connectivity is a big issue and very unreliable and this would force me to expose my databases to the internet which is an idea I'm not comfortable with.

Another option would be to write myself a daemon implementing integrity checks but before proceeding I'd like to know if anyone has undergone a similar challenge and what solutions have been undertaken.
If you only need one-way sync then I strongly recommend Londiste. For two-way, Londiste 3 or Bucardo can both do what you want with trigger-based replication.

Some ETL tools can do periodic table syncs, including two-way merges. Look into CloverETL, Pentaho Kettle, Talend Studio.

Don't try to roll your own. It's harder than you think.

The BDR project is working toward adding this to PostgreSQL, hopefully in 9.5, but it's currently in early development; I'm mentioning it so you're aware it exists for the future, and for later readers.