Is it possible to sync a Pervasive SQL database to a PostgreSQL database, and vice-versa?
Possible, yes.

We can't really give you guidance without more info, but you can generally build in logic regarding synchronization and use external apps to synchronize as you need to as a last resort.  PostreSQL also has,a bunch of other tools you might be able to use on that side including untrusted stored procedure languages.

It might not be easy, and it may take a lot of work, but it is possible.