Added synchronization support to samples - tested on PostgreSQL