pg12 rc1 on CentOS8 depend python2

2019-09-26 Thread keisuke kuroda
Hi.

I tried to install PostgreSQL12 RC1 on CentOS8.

# dnf install postgresql12-server postgresql12-contrib

===
 Package   ArchVersion
 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-setuptoolsnoarch
 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


Re: pg12 rc1 on CentOS8 depend python2

2019-09-26 Thread keisuke kuroda
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 :

> 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   ArchVersion
> >   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-setuptoolsnoarch
> >   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.kla...@aklaver.com
>


Re: pg12 rc1 on CentOS8 depend python2

2019-09-27 Thread keisuke kuroda
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.


Re: pg12 rc1 on CentOS8 depend python2

2019-10-03 Thread keisuke kuroda
> 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


Re: pg12 rc1 on CentOS8 depend python2

2019-11-18 Thread keisuke kuroda
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 :

>
> 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
>


Re: Creating many tables gets logical replication stuck

2020-08-24 Thread Keisuke Kuroda
Hi All,

There was a similar problem in this discussion:
  Logical decoding CPU-bound w/ large number of tables
  
https://www.postgresql.org/message-id/flat/CAHoiPjzea6N0zuCi%3D%2Bf9v_j94nfsy6y8SU7-%3Dbp4%3D7qw6_i%3DRg%40mail.gmail.com

> RelfilenodeMapHash from 1024 entries to 64.
The above changes reduced the performance impact.

However, I think the problem that there are too
many invalidations of RelfilenodeMapHash still remains.
As you report, when many tables are created/dropped/truncated,
The walsender process can get stuck.

-- 
Keisuke Kuroda
NTT Software Innovation Center
keisuke.kuroda.3...@gmail.com