Refactor NpgsqlFlush and NpgsqlSync, minor clean up.