Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is psycopg2-binary not recommended in production use? #488

Closed
jensens opened this issue Dec 29, 2021 · 3 comments
Closed

Why is psycopg2-binary not recommended in production use? #488

jensens opened this issue Dec 29, 2021 · 3 comments

Comments

@jensens
Copy link

jensens commented Dec 29, 2021

At https://github.com/zodb/relstorage/blob/master/docs/install.rst there is written:
"In the case of psycopg2, that binary package (which is not recommended for production use) can be installed with the name psycopg2-binary."

Why?

@jamadden
Copy link
Member

Because that's what the psycopg2 developers themselves say. They have a section on the website about it; I don't remember the details but IIRC it's something to do about either ABI issues or protocol issues.

@jamadden
Copy link
Member

https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary

If you are the maintainer of a published package depending on psycopg2 you shouldn’t use psycopg2-binary as a module dependency. For production use you are advised to use the source distribution.

The binary packages come with their own versions of a few C libraries, among which libpq and libssl, which will be used regardless of other libraries available on the client: upgrading the system libraries will not upgrade the libraries used by psycopg2. Please build psycopg2 from source if you want to maintain binary upgradeability.

Warning The psycopg2 wheel package comes packaged, among the others, with its own libssl binary. This may create conflicts with other extension modules binding with libssl as well, for instance with the Python ssl module: in some cases, under concurrency, the interaction between the two libraries may result in a segfault. In case of doubts you are advised to use a package built from source.

@jensens
Copy link
Author

jensens commented Dec 29, 2021

Thanks a lot!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants