Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#36875 - [postgresql] Python 3 (plpython3u) support

Attached to Project: Arch Linux
Opened by paradoxxx (zero) - Wednesday, 11 September 2013, 12:30 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 13 September 2013, 11:26 GMT
Task Type Feature Request
Category Packages: Extra
Status Assigned
Assigned To Dan McGee (toofishes)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 4
Private No


Python 3 is now by default in arch since a long time, maybe it's time to support it in the postgres build.

A better option might be a generating 2 different optional packages (postgres-lib-python2, postgres-lib-python for instance). Debian already ships the plpython libs like this (,

I managed to alter the postgres PKGBUILD in order to have two different build dirs (as it is required to run twice the configure with the different python versions) to generate both packages, see attached PKGBUILD.

Warning: The attached PKGBUILD is just an example of how I managed to generate both plpython libs.


Additional info:
* Concerns postgresql-9.3.0, postgresql-libs-9.3.0
   PKGBUILD (6.6 KiB)
This task depends upon

Comment by Dan McGee (toofishes) - Friday, 06 December 2013, 15:48 GMT
Is there no way we can get a side-by-side install of something like and
Comment by paradoxxx (zero) - Friday, 06 December 2013, 16:34 GMT
Totally, I managed to make a package that only install plpython3 libs:
Comment by David Ford (FirefighterBlu3) - Tuesday, 08 September 2015, 01:12 GMT
Please change the default of python2 to python3 which is the de facto installation of python on ArchLinux
Comment by Dario Ostuni (dariost) - Wednesday, 11 January 2017, 15:54 GMT
This problem is still present in postgresql 9.6.1-3
Comment by Andrei Antonov (pl_m) - Tuesday, 24 January 2017, 19:46 GMT
> Is there no way we can get a side-by-side install of something like and

I think in modern version of Postgres -- will NOT problem with install both version of plpython<?>u (at same time. but in not use both it in one PG-session),

from Postgres documentation:

> It is not allowed to use PL/Python based on Python 2 and PL/Python based on Python 3 in the same session, because the symbols in the dynamic modules would clash, which could result in crashes of the PostgreSQL server process. There is a check that prevents mixing Python major versions in a session, which will abort the session if a mismatch is detected. It is possible, however, to use both PL/Python variants in the same database, from separate sessions.

thanks in advance! :-)
Comment by Dario Ostuni (dariost) - Monday, 10 July 2017, 16:25 GMT
Any updates on this?