target-postgres icon indicating copy to clipboard operation
target-postgres copied to clipboard

Use `psycopg2-binary` package

Open WillDaSilva opened this issue 1 year ago • 0 comments

https://pypi.org/project/psycopg2-binary/

By using the non-binary version of the package all consumers of the package (including those with transitive dependencies on it) need to have compilation toolchain installed along with libpq-dev, and several other system-level dependencies. This significantly limits portability, and is a frequent source of issues.

Though Psycopg advises users to compile their Python library from source instead of using the binary (i.e. pre-built) version for production use-cases, their binary package is widely used in production use-cases without issue. Within the Singer ecosystem it's used by other Postgres targets, such as the Transferwise variant

The Python ecosystem as a whole is thankfully starting to move away from the expectation that users should run arbitrary code from dependencies at install-time, generally to compile Python extension modules. It would be nice if Data Mill's target-postgres could use psycopg2-binary to enable its users to use pre-built wheels rather than having to build them themselves.

WillDaSilva avatar Aug 15 '22 17:08 WillDaSilva