Hi,
I have a database running in docker that I want to migrate to native Nixos. I can’t get the plpython3u
available in PostgreSQL. From what I understand, Python should be enabled if it is available on the system (nixpkgs/pkgs/servers/sql/postgresql/generic.nix at 55d1f923c480dadce40f5231feb472e81b0bab48 · NixOS/nixpkgs · GitHub). I also saw this post and tried the override without success. I’ve enabled Python on the system with
environment.systemPackages = [ pkgs.python3 ];
sudo -u postgres /nix/store/n4gj0dmk2wpwl08s6sqng2f0jdqqkrjs-postgresql-and-plugins-17.5/bin/psql -h /tmp/tmp.sYB9hVQAgz -X -d gosk -c 'ALTER EXTENSION plpython3u UPDATE;'
WARNING: database "gosk" has a collation version mismatch
DETAIL: The database was created using collation version 2.35, but the operating system provides version 2.40.
HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE gosk REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
ERROR: extension "plpython3u" is not available
DETAIL: Could not open extension control file "/nix/store/gbniv0b4hm6pjky7f1iyradwdmb4g4l0-postgresql-and-plugins-15.13/share/postgresql/extension/plpython3u.control": No such file or directory.
HINT: The extension must first be installed on the system where PostgreSQL is running.