Thread: where can I download the binaries of plpython extension
Hi,
I installed postgresql v9.6/10 in our company. When I tried to create the extension plpython I got the next error :
ERROR: could not open extension control file "/PostgreSQL/9.6/share/postgresql/extension/plpythonu.control": No such file or directory
When I try to install the extension with yum it downloads the extension that is suitable for postgres 9.2 and moreover it also tries to install postgres 9.2 as one of the extensions dependencies.
Where can I find the source files of the extension for my version or how can I install it ?
Thanks , Mariel.
On Sun, Jul 08, 2018 at 04:06:50PM +0300, Mariel Cherkassky wrote: > Hi, > I installed postgresql v9.6/10 in our company. Which version did you install and how ? Compiled or binaries from some repo ? Using PGDG repo or some other one ? > When I try to install the extension with yum it downloads the extension > that is suitable for postgres 9.2 and moreover it also tries to install > postgres 9.2 as one of the extensions dependencies. I guess you have a version of RHEL for which the bundled, RH version of postgres is v9.2 (?) I see that's true for centos7: postgresql-plpython.x86_64 9.2.23-3.el7_4 base If you're using the PGDG repo (and probably if you're using another one, too), keep in mind that most of the PG packages (at least since around version 9) have as a suffix of their package name the major version: eg postgresql10-contrib, postgis24_10-client, pgfincore10, pg_repack10). That allows co-installing different major versions of postgres. > Where can I find the source files of the extension for my version or how > can I install it ? Suggest trying to yum install postgresql10-plpython Justin
I download the source files from the official website compiled them and installed postgresql manually.
In what repository does the postgresql10-plpython exist ? or even the 9 version ? I dont find them via yum search.
2018-07-08 16:20 GMT+03:00 Justin Pryzby <pryzby@telsasoft.com>:
On Sun, Jul 08, 2018 at 04:06:50PM +0300, Mariel Cherkassky wrote:
> Hi,
> I installed postgresql v9.6/10 in our company.
Which version did you install and how ? Compiled or binaries from some repo ?
Using PGDG repo or some other one ?
> When I try to install the extension with yum it downloads the extension
> that is suitable for postgres 9.2 and moreover it also tries to install
> postgres 9.2 as one of the extensions dependencies.
I guess you have a version of RHEL for which the bundled, RH version of
postgres is v9.2 (?) I see that's true for centos7:
postgresql-plpython.x86_64 9.2.23-3.el7_4 base
If you're using the PGDG repo (and probably if you're using another one, too),
keep in mind that most of the PG packages (at least since around version 9)
have as a suffix of their package name the major version: eg
postgresql10-contrib, postgis24_10-client, pgfincore10, pg_repack10).
That allows co-installing different major versions of postgres.
> Where can I find the source files of the extension for my version or how
> can I install it ?
Suggest trying to yum install postgresql10-plpython
Justin
On Sun, Jul 08, 2018 at 04:24:10PM +0300, Mariel Cherkassky wrote: > I download the source files from the official website compiled them and > installed postgresql manually. > In what repository does the postgresql10-plpython exist ? or even the 9 > version ? I dont find them via yum search. If you're using yum: https://www.postgresql.org/download/ => https://www.postgresql.org/download/linux/redhat/ => http://yum.postgresql.org/ Note I believe those are technically considered "unofficial" RPMs provided by EnterpriseDB. Justin
When installing the postgresql10-plpython one of its dependencies is the postgresql10-server. However, I dont want to install the server but as you can see it is a must. What can I do ?
2018-07-08 16:33 GMT+03:00 Justin Pryzby <pryzby@telsasoft.com>:
On Sun, Jul 08, 2018 at 04:24:10PM +0300, Mariel Cherkassky wrote:
> I download the source files from the official website compiled them and
> installed postgresql manually.
> In what repository does the postgresql10-plpython exist ? or even the 9
> version ? I dont find them via yum search.
If you're using yum:
https://www.postgresql.org/download/
=> https://www.postgresql.org/download/linux/redhat/
=> http://yum.postgresql.org/
Note I believe those are technically considered "unofficial" RPMs provided by
EnterpriseDB.
Justin
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes: > When installing the postgresql10-plpython one of its dependencies is > the postgresql10-server. However, I dont want to install the server but as > you can see it is a must. What can I do ? Um ... of what value do you think plpython is without a server for it to run in? regards, tom lane
On Sun, Jul 08, 2018 at 04:38:21PM +0300, Mariel Cherkassky wrote: > When installing the postgresql10-plpython one of its dependencies is > the postgresql10-server. However, I dont want to install the server but as > you can see it is a must. What can I do ? All it does is install files allowing loading the language into the server as extension; Why do you want the language without the server ? [pryzbyj@database ~]$ rpm -ql postgresql10-plpython /usr/pgsql-10/lib/plpython2.so /usr/pgsql-10/share/extension/plpython2u--1.0.sql /usr/pgsql-10/share/extension/plpython2u--unpackaged--1.0.sql /usr/pgsql-10/share/extension/plpython2u.control [...] /usr/pgsql-10/share/locale/de/LC_MESSAGES/plpython-10.mo [...] But anyway, is it a problem ? You could let it install the server binaries to /usr/pgsql-10 and then ignore them. And actually I believe RH has the ability for an admin to "prune" paths after package installation (The usual example is /usr/share/doc). You could do that if you want. Or if you just want to look at the files, you can use rpm2cpio ./rpm |cpio -i --make Or you can install it on a VM. Justin
As I mentioned earlier, I already have a running postgresql instance on the machibe but on different pathes. I didnt want to install another one with the default pathes because I didnt want people to think that the default pathes are the correct ones. If I'll install the package to the default values then the solution is just coppying the plpythonu.control to my instance`s extensions directory ?
2018-07-08 16:43 GMT+03:00 Justin Pryzby <pryzby@telsasoft.com>:
On Sun, Jul 08, 2018 at 04:38:21PM +0300, Mariel Cherkassky wrote:
> When installing the postgresql10-plpython one of its dependencies is
> the postgresql10-server. However, I dont want to install the server but as
> you can see it is a must. What can I do ?
All it does is install files allowing loading the language into the server as
extension; Why do you want the language without the server ?
[pryzbyj@database ~]$ rpm -ql postgresql10-plpython
/usr/pgsql-10/lib/plpython2.so
/usr/pgsql-10/share/extension/plpython2u--1.0.sql
/usr/pgsql-10/share/extension/plpython2u--unpackaged--1.0. sql
/usr/pgsql-10/share/extension/plpython2u.control
[...]
/usr/pgsql-10/share/locale/de/LC_MESSAGES/plpython-10.mo
[...]
But anyway, is it a problem ? You could let it install the server binaries to
/usr/pgsql-10 and then ignore them. And actually I believe RH has the ability
for an admin to "prune" paths after package installation (The usual example is
/usr/share/doc). You could do that if you want.
Or if you just want to look at the files, you can use rpm2cpio ./rpm |cpio -i --make
Or you can install it on a VM.
Justin
On Sun, Jul 08, 2018 at 04:46:47PM +0300, Mariel Cherkassky wrote: > As I mentioned earlier, I already have a running postgresql instance on the > machibe but on different pathes. I didnt want to install another one with > the default pathes because I didnt want people to think that the default > pathes are the correct ones. If I'll install the package to the default > values then the solution is just coppying the plpythonu.control to my > instance`s extensions directory ? I'm not sure about compatibilty of differently compiled binaries (different --configure flags, different compiler/version, different PG minor versions), but I think that could work.. As I mentioned, you could also EXTRACT the PGDG postgresql10-plpython files without installing the -server. Or you could compile+install the plpython extension. I'm not sure but I think that would be ./configure --with-python. ..However if it were me, I'd schedule a time to stop the server, move the custom-compiled binaries out of the way, and restart using the PGDG binaries pointing at the original data dir. I think the only condition for doing this is keep the same major version (10) and to avoid lower minor versions (eg. once you start with PGDG 10.4 binaries you should avoid going back and starting with locally-compiled 10.3 binaries). Justin
I still got the binaries of the installation and I found that I have the next directory :
postgresql-10.4/src/pl/
cd postgresql-10.4/src/pl/plpython
-rw-r--r-- 1 postgres postgres 653 May 7 23:51 Makefile
drwxr-xr-x 3 postgres postgres 33 May 8 00:03 plpgsql
drwxr-xr-x 5 postgres postgres 4096 May 8 00:03 plperl
drwxr-xr-x 5 postgres postgres 319 May 8 00:06 tcl
drwxr-xr-x 5 postgres postgres 4096 May 8 00:06 plpython
is there a way to install the extension from here ?
2018-07-08 17:18 GMT+03:00 Justin Pryzby <pryzby@telsasoft.com>:
On Sun, Jul 08, 2018 at 04:46:47PM +0300, Mariel Cherkassky wrote:
> As I mentioned earlier, I already have a running postgresql instance on the
> machibe but on different pathes. I didnt want to install another one with
> the default pathes because I didnt want people to think that the default
> pathes are the correct ones. If I'll install the package to the default
> values then the solution is just coppying the plpythonu.control to my
> instance`s extensions directory ?
I'm not sure about compatibilty of differently compiled binaries (different
--configure flags, different compiler/version, different PG minor versions),
but I think that could work..
As I mentioned, you could also EXTRACT the PGDG postgresql10-plpython files
without installing the -server.
Or you could compile+install the plpython extension. I'm not sure but I think
that would be ./configure --with-python.
..However if it were me, I'd schedule a time to stop the server, move the
custom-compiled binaries out of the way, and restart using the PGDG binaries
pointing at the original data dir. I think the only condition for doing this
is keep the same major version (10) and to avoid lower minor versions (eg. once
you start with PGDG 10.4 binaries you should avoid going back and starting with
locally-compiled 10.3 binaries).
Justin
On Sun, Jul 08, 2018 at 05:36:06PM +0300, Mariel Cherkassky wrote: > I still got the binaries of the installation and I found that I have the > next directory : postgresql-10.4/src/pl/ > cd postgresql-10.4/src/pl/plpython > -rw-r--r-- 1 postgres postgres 653 May 7 23:51 Makefile > drwxr-xr-x 3 postgres postgres 33 May 8 00:03 plpgsql > drwxr-xr-x 5 postgres postgres 4096 May 8 00:03 plperl > drwxr-xr-x 5 postgres postgres 319 May 8 00:06 tcl > drwxr-xr-x 5 postgres postgres 4096 May 8 00:06 plpython > > is there a way to install the extension from here ? I think you're asking about this option: > > Or you could compile+install the plpython extension. I'm not sure but I > > think that would be ./configure --with-python. Justin
Yes, it worked. Thanks!
On Sun, Jul 8, 2018, 8:25 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
On Sun, Jul 08, 2018 at 05:36:06PM +0300, Mariel Cherkassky wrote:
> I still got the binaries of the installation and I found that I have the
> next directory : postgresql-10.4/src/pl/
> cd postgresql-10.4/src/pl/plpython
> -rw-r--r-- 1 postgres postgres 653 May 7 23:51 Makefile
> drwxr-xr-x 3 postgres postgres 33 May 8 00:03 plpgsql
> drwxr-xr-x 5 postgres postgres 4096 May 8 00:03 plperl
> drwxr-xr-x 5 postgres postgres 319 May 8 00:06 tcl
> drwxr-xr-x 5 postgres postgres 4096 May 8 00:06 plpython
>
> is there a way to install the extension from here ?
I think you're asking about this option:
> > Or you could compile+install the plpython extension. I'm not sure but I
> > think that would be ./configure --with-python.
Justin