pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg12 rc1 on CentOS8 depend python2
12+ messages / 5 participants
[nested] [flat]

* pg12 rc1 on CentOS8 depend python2
@ 2019-09-27 01:50  keisuke kuroda <keisuke.kuroda.3862@gmail.com>
  0 siblings, 2 replies; 12+ messages in thread

From: keisuke kuroda @ 2019-09-27 01:50 UTC (permalink / raw)
  To: pgsql-general; pgsql-pkg-yum@postgresql.org

Hi.

I tried to install PostgreSQL12 RC1 on CentOS8.

# dnf install postgresql12-server postgresql12-contrib

===============================================================================================
 Package                           Arch                Version
                                 Repository                           Size
===============================================================================================
Installing:
 postgresql12-contrib              x86_64              12rc1-1PGDG.rhel8
                                 pgdg12-updates-testing              660 k
 postgresql12-server               x86_64              12rc1-1PGDG.rhel8
                                 pgdg12-updates-testing              5.3 M
Installing dependencies:
 python2                           x86_64
 2.7.15-22.module_el8.0.0+32+017b2cba                 AppStream
              107 k
 python2-libs                      x86_64
 2.7.15-22.module_el8.0.0+32+017b2cba                 AppStream
              6.0 M
 python2-pip                       noarch
 9.0.3-13.module_el8.0.0+32+017b2cba                  AppStream
              2.0 M
 python2-setuptools                noarch
 39.0.1-11.module_el8.0.0+32+017b2cba                 AppStream
              643 k
 postgresql12                      x86_64              12rc1-1PGDG.rhel8
                                 pgdg12-updates-testing              1.8 M
 postgresql12-libs                 x86_64              12rc1-1PGDG.rhel8
                                 pgdg12-updates-testing              405 k
Enabling module streams:
 python27                                              2.7

CentOS8 does not have python2 installed by default, But PostgreSQL is
dependent on python2.

Do we need to install python2 when we use PostgreSQL on CentOS8?

Best Regards.
Keisuke Kuroda

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-09-27 04:03  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: keisuke kuroda <keisuke.kuroda.3862@gmail.com>
  1 sibling, 1 reply; 12+ messages in thread

From: Adrian Klaver @ 2019-09-27 04:03 UTC (permalink / raw)
  To: keisuke kuroda <keisuke.kuroda.3862@gmail.com>; pgsql-general; pgsql-pkg-yum@postgresql.org

On 9/26/19 6:50 PM, keisuke kuroda wrote:
> Hi.
> 
> I tried to install PostgreSQL12 RC1 on CentOS8.
> 
> # dnf install postgresql12-server postgresql12-contrib
> 
> ===============================================================================================
>   Package                           Arch                Version         
>                                       Repository                         
>    Size
> ===============================================================================================
> Installing:
>   postgresql12-contrib              x86_64             
>   12rc1-1PGDG.rhel8                                   
>   pgdg12-updates-testing              660 k
>   postgresql12-server               x86_64             
>   12rc1-1PGDG.rhel8                                   
>   pgdg12-updates-testing              5.3 M
> Installing dependencies:
>   python2                           x86_64             
>   2.7.15-22.module_el8.0.0+32+017b2cba                 AppStream         
>                    107 k
>   python2-libs                      x86_64             
>   2.7.15-22.module_el8.0.0+32+017b2cba                 AppStream         
>                    6.0 M
>   python2-pip                       noarch             
>   9.0.3-13.module_el8.0.0+32+017b2cba                  AppStream         
>                    2.0 M
>   python2-setuptools                noarch             
>   39.0.1-11.module_el8.0.0+32+017b2cba                 AppStream         
>                    643 k
>   postgresql12                      x86_64             
>   12rc1-1PGDG.rhel8                                   
>   pgdg12-updates-testing              1.8 M
>   postgresql12-libs                 x86_64             
>   12rc1-1PGDG.rhel8                                   
>   pgdg12-updates-testing              405 k
> Enabling module streams:
>   python27                                              2.7
> 
> CentOS8 does not have python2 installed by default, But PostgreSQL is 
> dependent on python2.
> 
> Do we need to install python2 when we use PostgreSQL on CentOS8?

If it is installing plpythonu, then yes. From the docs:

https://www.postgresql.org/docs/12/plpython-python23.html

"The language named plpythonu implements PL/Python based on the default 
Python language variant, which is currently Python 2. (This default is 
independent of what any local Python installations might consider to be 
their “default”, for example, what /usr/bin/python might be.) The 
default will probably be changed to Python 3 in a distant future release 
of PostgreSQL, depending on the progress of the migration to Python 3 in 
the Python community."


> 
> Best Regards.
> Keisuke Kuroda


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-09-27 04:24  keisuke kuroda <keisuke.kuroda.3862@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 12+ messages in thread

From: keisuke kuroda @ 2019-09-27 04:24 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general; pgsql-pkg-yum@postgresql.org

Thank you for your reply!

Even if I don't need to install plpythonu,
RPM package includes "CONFIGURE = --with-python".
Therefore I think that I need to install python2 when RPM install.
Is my understanding correct?

Best Regards.
Keisuke Kuroda

2019年9月27日(金) 13:03 Adrian Klaver <adrian.klaver@aklaver.com>:

> On 9/26/19 6:50 PM, keisuke kuroda wrote:
> > Hi.
> >
> > I tried to install PostgreSQL12 RC1 on CentOS8.
> >
> > # dnf install postgresql12-server postgresql12-contrib
> >
> >
> ===============================================================================================
> >   Package                           Arch                Version
> >                                       Repository
> >    Size
> >
> ===============================================================================================
> > Installing:
> >   postgresql12-contrib              x86_64
> >   12rc1-1PGDG.rhel8
> >   pgdg12-updates-testing              660 k
> >   postgresql12-server               x86_64
> >   12rc1-1PGDG.rhel8
> >   pgdg12-updates-testing              5.3 M
> > Installing dependencies:
> >   python2                           x86_64
> >   2.7.15-22.module_el8.0.0+32+017b2cba                 AppStream
> >                    107 k
> >   python2-libs                      x86_64
> >   2.7.15-22.module_el8.0.0+32+017b2cba                 AppStream
> >                    6.0 M
> >   python2-pip                       noarch
> >   9.0.3-13.module_el8.0.0+32+017b2cba                  AppStream
> >                    2.0 M
> >   python2-setuptools                noarch
> >   39.0.1-11.module_el8.0.0+32+017b2cba                 AppStream
> >                    643 k
> >   postgresql12                      x86_64
> >   12rc1-1PGDG.rhel8
> >   pgdg12-updates-testing              1.8 M
> >   postgresql12-libs                 x86_64
> >   12rc1-1PGDG.rhel8
> >   pgdg12-updates-testing              405 k
> > Enabling module streams:
> >   python27                                              2.7
> >
> > CentOS8 does not have python2 installed by default, But PostgreSQL is
> > dependent on python2.
> >
> > Do we need to install python2 when we use PostgreSQL on CentOS8?
>
> If it is installing plpythonu, then yes. From the docs:
>
> https://www.postgresql.org/docs/12/plpython-python23.html
>
> "The language named plpythonu implements PL/Python based on the default
> Python language variant, which is currently Python 2. (This default is
> independent of what any local Python installations might consider to be
> their “default”, for example, what /usr/bin/python might be.) The
> default will probably be changed to Python 3 in a distant future release
> of PostgreSQL, depending on the progress of the migration to Python 3 in
> the Python community."
>
>
> >
> > Best Regards.
> > Keisuke Kuroda
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-09-27 13:38  Tom Lane <tgl@sss.pgh.pa.us>
  parent: keisuke kuroda <keisuke.kuroda.3862@gmail.com>
  0 siblings, 3 replies; 12+ messages in thread

From: Tom Lane @ 2019-09-27 13:38 UTC (permalink / raw)
  To: keisuke kuroda <keisuke.kuroda.3862@gmail.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general; pgsql-pkg-yum@postgresql.org

keisuke kuroda <keisuke.kuroda.3862@gmail.com> writes:
> Even if I don't need to install plpythonu,
> RPM package includes "CONFIGURE = --with-python".
> Therefore I think that I need to install python2 when RPM install.
> Is my understanding correct?

The core server package shouldn't have any python dependency.

It doesn't surprise me so much that the contrib package does, though.
Most likely, that includes the plpython transform modules
(hstore_plpython, jsonb_plpython, etc), which are certainly going to
depend on whichever libpython PG was built with.

It might've been better to split out those modules as a separate
package.  OTOH that would add confusion, and we have a lot of
subpackages already.

Another idea might be to bundle them into the plpython package
instead of contrib (and similarly for the plperl transforms).

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-09-27 14:15  Christoph Berg <myon@debian.org>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 1 reply; 12+ messages in thread

From: Christoph Berg @ 2019-09-27 14:15 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: keisuke kuroda <keisuke.kuroda.3862@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general; pgsql-pkg-yum@postgresql.org

Re: Tom Lane 2019-09-27 <19495.1569591498@sss.pgh.pa.us>
> Another idea might be to bundle them into the plpython package
> instead of contrib (and similarly for the plperl transforms).

Fwiw, the Debian packages do that.

Christoph





^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-09-27 15:25  keisuke kuroda <keisuke.kuroda.3862@gmail.com>
  parent: Christoph Berg <myon@debian.org>
  0 siblings, 0 replies; 12+ messages in thread

From: keisuke kuroda @ 2019-09-27 15:25 UTC (permalink / raw)
  To: Christoph Berg <myon@debian.org>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general; pgsql-pkg-yum@postgresql.org

Thank you for the reply.
I understand that contrib package depend libpython.

> Another idea might be to bundle them into the plpython package
> instead of contrib (and similarly for the plperl transforms).

I think that this idea sounds good.
If I don't use plpython, it is happy for me
that don't have to install python.

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-09-30 11:20  Devrim Gündüz <devrim@gunduz.org>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 1 reply; 12+ messages in thread

From: Devrim Gündüz @ 2019-09-30 11:20 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; keisuke kuroda <keisuke.kuroda.3862@gmail.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general; pgsql-pkg-yum@postgresql.org


Hi,

On Fri, 2019-09-27 at 09:38 -0400, Tom Lane wrote:
> It doesn't surprise me so much that the contrib package does, though.
> Most likely, that includes the plpython transform modules
> (hstore_plpython, jsonb_plpython, etc), which are certainly going to
> depend on whichever libpython PG was built with.
> 
> It might've been better to split out those modules as a separate
> package.  OTOH that would add confusion, and we have a lot of
> subpackages already.

I think postgresql-contrib-py3 is really the best idea at this point, otherwise
I cannot see a clean way to make this without breaking existing installations.

I cannot move those contrib modules under plpython* subpackage -- I mean, I
*can, but then the installations will break in next upgrade. OTOH, I can add
Requires: -contrb for plpython package, then it will be the same problem.

Am I missing something?

Regards,
--
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-10-01 07:57  Christoph Berg <myon@debian.org>
  parent: Devrim Gündüz <devrim@gunduz.org>
  0 siblings, 1 reply; 12+ messages in thread

From: Christoph Berg @ 2019-10-01 07:57 UTC (permalink / raw)
  To: Devrim Gündüz <devrim@gunduz.org>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; keisuke kuroda <keisuke.kuroda.3862@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general; pgsql-pkg-yum@postgresql.org

Re: Devrim Gündüz 2019-09-30 <camel@gunduz.org/">21705bb57210f01b559ec2f5de8550df586324e2.camel@gunduz.org>
> I think postgresql-contrib-py3 is really the best idea at this point, otherwise
> I cannot see a clean way to make this without breaking existing installations.

Users of these (now contrib) modules need to have
postgresql12-plpython3 installed anyway, so it's unlikely you'd be
breaking anyone's installation.

> I cannot move those contrib modules under plpython* subpackage -- I mean, I
> *can, but then the installations will break in next upgrade. OTOH, I can add
> Requires: -contrb for plpython package, then it will be the same problem.

There must be a way to move a file from one package to another?
(In .deb, this requires
Replaces: sourcedeb (<< newversion)
Conflits: sourcedeb (<< newversion)
in the target package.)

Christoph





^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-10-04 01:03  keisuke kuroda <keisuke.kuroda.3862@gmail.com>
  parent: Christoph Berg <myon@debian.org>
  0 siblings, 0 replies; 12+ messages in thread

From: keisuke kuroda @ 2019-10-04 01:03 UTC (permalink / raw)
  To: Christoph Berg <myon@debian.org>; +Cc: Devrim Gündüz <devrim@gunduz.org>; Tom Lane <tgl@sss.pgh.pa.us>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general; pgsql-pkg-yum@postgresql.org

> Users of these (now contrib) modules need to have
> postgresql12-plpython3 installed anyway, so it's unlikely you'd be
> breaking anyone's installation.

I agree.
To use these EXTENSION(hstore_plpython,jsonb_plpython, and ltree_plpython),
we need to install plpythonu anyway.
I don't think it would be a problem to move these EXTENSIONs to the
plpython package.

By using the rpm "--nodeps" option,
PostgreSQL 12 could be installed on CentOS8 where python2 is not installed.

# rpm -ivh --nodeps *
   1:postgresql12-libs-12.0-1PGDG.rhel################################# [
20%]
   2:postgresql12-12.0-1PGDG.rhel8    ################################# [
40%]
   3:postgresql12-contrib-12.0-1PGDG.r################################# [
60%]
   4:postgresql12-server-12.0-1PGDG.rh################################# [
80%]
   5:postgresql12-docs-12.0-1PGDG.rhel#################################
[100%]

plpython could be installed in the same way.

# rpm -ivh --nodeps postgresql12-plpython-12.0-1PGDG.rhel8.x86_64.rpm
   1:postgresql12-plpython-12.0-1PGDG.#################################
[100%]

Of course, "CREATE EXTENSION plpythonu" has caused an ERROR because CentOS8
isn't installed python2.

postgres=# CREATE EXTENSION plpythonu;
ERROR:  could not load library "/usr/pgsql-12/lib/plpython2.so":
libpython2.7.so.1.0: cannot open shared object file: No such file or
directory postgres=#

"CREATE EXTENSION hstore_plpython2u" has caused an ERROR because required
"plpython2u".

postgres=# CREATE EXTENSION hstore_plpython2u;
ERROR:  required extension "plpython2u" is not installed
HINT:  Use CREATE EXTENSION ... CASCADE to install required extensions too.


By the way, "python2-libs is needed" error has occurred when
"postgresql12-12.0-1PGDG.rhel8.x86_64.rpm" and
"postgresql12-libs-12.0-1PGDG.rhel8.x86_64.rpm" install.

# rpm -ivh postgresql12-12.0-1PGDG.rhel8.x86_64.rpm
postgresql12-libs-12.0-1PGDG.rhel8.x86_64.rpm
error: Failed dependencies:
        python2-libs is needed by postgresql12-12rc1-1PGDG.rhel8.x86_64

In this case, I think that python2-libs is not necessary.


Best Regards.
Keisuke Kuroda

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-11-17 01:39  Devrim Gündüz <devrim@gunduz.org>
  parent: keisuke kuroda <keisuke.kuroda.3862@gmail.com>
  1 sibling, 0 replies; 12+ messages in thread

From: Devrim Gündüz @ 2019-11-17 01:39 UTC (permalink / raw)
  To: keisuke kuroda <keisuke.kuroda.3862@gmail.com>; pgsql-general; pgsql-pkg-yum@postgresql.org


Hi,

On Fri, 2019-09-27 at 10:50 +0900, keisuke kuroda wrote:
> CentOS8 does not have python2 installed by default, But PostgreSQL is
> dependent on python2.
> 
> Do we need to install python2 when we use PostgreSQL on CentOS8?

For the archives: I fixed this in 12.1 packages. Core package do not depend on
PythonX.

Regards,
-- 
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-11-17 01:40  Devrim Gündüz <devrim@gunduz.org>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 1 reply; 12+ messages in thread

From: Devrim Gündüz @ 2019-11-17 01:40 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; keisuke kuroda <keisuke.kuroda.3862@gmail.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general; pgsql-pkg-yum@postgresql.org


Hi,

On Fri, 2019-09-27 at 09:38 -0400, Tom Lane wrote:
> Another idea might be to bundle them into the plpython package
> instead of contrib (and similarly for the plperl transforms).

This went into the last week's minor updates.

Regards,
-- 
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pg12 rc1 on CentOS8 depend python2
@ 2019-11-19 01:42  keisuke kuroda <keisuke.kuroda.3862@gmail.com>
  parent: Devrim Gündüz <devrim@gunduz.org>
  0 siblings, 0 replies; 12+ messages in thread

From: keisuke kuroda @ 2019-11-19 01:42 UTC (permalink / raw)
  To: Devrim Gündüz <devrim@gunduz.org>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general; pgsql-pkg-yum@postgresql.org

Hello Devrim.

Thank you for your help!
I have been able to install PostgreSQL 12.1(rpm) on CentOS 8.0(without
python2).
It has also possible to install on CentOS 7.6(without python3).

Best Regards,
Keisuke Kuroda

2019年11月17日(日) 10:40 Devrim Gündüz <devrim@gunduz.org>:

>
> Hi,
>
> On Fri, 2019-09-27 at 09:38 -0400, Tom Lane wrote:
> > Another idea might be to bundle them into the plpython package
> > instead of contrib (and similarly for the plperl transforms).
>
> This went into the last week's minor updates.
>
> Regards,
> --
> Devrim Gündüz
> Open Source Solution Architect, Red Hat Certified Engineer
> Twitter: @DevrimGunduz , @DevrimGunduzTR
>

^ permalink  raw  reply  [nested|flat] 12+ messages in thread


end of thread, other threads:[~2019-11-19 01:42 UTC | newest]

Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27 01:50 pg12 rc1 on CentOS8 depend python2 keisuke kuroda <keisuke.kuroda.3862@gmail.com>
2019-09-27 04:03 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-09-27 04:24   ` keisuke kuroda <keisuke.kuroda.3862@gmail.com>
2019-09-27 13:38     ` Tom Lane <tgl@sss.pgh.pa.us>
2019-09-27 14:15       ` Christoph Berg <myon@debian.org>
2019-09-27 15:25         ` keisuke kuroda <keisuke.kuroda.3862@gmail.com>
2019-09-30 11:20       ` Devrim Gündüz <devrim@gunduz.org>
2019-10-01 07:57         ` Christoph Berg <myon@debian.org>
2019-10-04 01:03           ` keisuke kuroda <keisuke.kuroda.3862@gmail.com>
2019-11-17 01:40       ` Devrim Gündüz <devrim@gunduz.org>
2019-11-19 01:42         ` keisuke kuroda <keisuke.kuroda.3862@gmail.com>
2019-11-17 01:39 ` Devrim Gündüz <devrim@gunduz.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox