You could query pg_stat_replication on the master, compare sent_locationand replay_location, and if they are the same, the replication is in sync.
--Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html