update postgres path, add sync function