Package: devpi-postgresql
devpi-postgresql: a PostgreSQL storage backend for devpi-serverThis plugin adds a PostgreSQL storage backend fordevpi-server.Installationdevpi-postgresqlneeds to be installed alongsidedevpi-server.You can install it with:pip install devpi-postgresqlRequirementsAt least PostgreSQL 9.5 is required forON CONFLICTsupport.UsageWhen using the PostgreSQL storage,devpi-serverexpects an empty database.
You have to create one like this:createdb devpiDepending on your PostgreSQL setup you have to create a user and grant it permissions on the new database like this:CREATE ROLE devpi WITH LOGIN;
GRANT CREATE, CONNECT ON DATABASE devpi TO devpi;Upon first initialization ofdevpi-serveruse--storagepg8000to select the PostgreSQL backend.By default it’ll use thedevpidatabase onlocalhostport5432.
To change that, usestorage pg8000:host=example.com,port=5433,database=devpi_prod.
The possible settings are:database,host,port,unix_sock,user,password,ssl_check_hostname,ssl_ca_certs,ssl_certfileandssl_keyfile.If any of the “ssl” settings is specified, a secure Postgres connection will be made. Typically, the name of a file containing a certificate authority certificate will need to be specified viassl_ca_certs. By default, the server’s hostname will be checked against the certificate it presents. Optionally disable this behavior with thessl_check_hostnamesetting.  Usessl_certfileandssl_keyfileto enable certificate-based client authentication.All user/index files and metadata ofdevpi-serverare stored in the database.
A few things and settings are still stored as files in the directory specified by--serverdir.Plugins likedevpi-webdon’t or can’t use the storage backend.
They still handle their own storage.SupportIf you find a bug, use theissue tracker at Github.For general questions useGitHub Discussionsor thedevpi-dev@python.org mailing list.For support contracts and paid help contactmail at pyfidelity.com.Changelog3.0.1 (2022-04-25)Bug FixesFix #884: Error during startup of devpi-server.3.0.0 (2022-03-18)Deprecations and RemovalsRequire at least devpi-server 6.2.0.FeaturesSupport performance and memory optimizations enabled by devpi-server >= 6.2.0.Support new storage interface from devpi-server 6.5.0 to keep files out of memory.Files are stored in a temporary location and committed to the database in one shorter transaction block. This also reduces the time locks are held on the database.Support memory optimizations enabled by devpi-server 6.5.0 to keep cache small.Switch to native interface introduced in pg8000 1.17.0.Stream files directly through database connection usingCOPY.Bug FixesReduce chances of conflicts by using a postgresql sequence for serials. This can cause serials with no changes due to gaps in the sequence in case of conflicts, but these are harmless.2.0.0 (2020-04-14)Deprecations and RemovalsPython 3.4 isn’t supported anymore, Python 3.5 support will be dropped at its EOL in September 2020.FeaturesUpgrade pg8000 to version 1.14.0 or newer and take advantage of its improved SSL interface.1.1.0 (2020-01-31)Featuresfix #738: addssl_cert_reqs,ssl_ca_certs,ssl_certfileandssl_keyfilesettings to the –storage=pg8000 option. Each setting corresponds to the similarly-named key (remove the initialssl_) in thesslparameter passed to pg8000.connect().ssl_cert_reqsshould be either “cert_optional” or “cert_required” and the other three settings are file names.1.0.0 (2019-04-26)Deprecations and RemovalsRequires at least PostgreSQL 9.5 forON CONFLICTsupport.Dropped support for Python 2.x and PyPy2.