[postgres] Cleanup lint warnings and docstrings
[postgres] Exist query for CopyToTable

Set an optional exists_query method on a CopyToTable subtask
to use as a backup in case the marker table default
mechanism determines a dataset doesn't exist.
This is to prevent duplicated data insertion.
If exists_query determines data to exist, the update
marker is reinserted to "fix" the cache.