Thread: New repo RPMs

New repo RPMs

From
Devrim Gündüz
Date:
Hi,

I made 3 major changes in the PGDG RPM (RHEL/Fedora/CentOS/SL) repo files:

1. Instead of having separate repo RPMs per PostgreSQL major version, we now
have one single repo RPM that supports all supported PostgreSQL releases. This
will make our lives easier. The new packages obsolete the current ones.

2. While working on it, bumped up the repo RPM version to 42. Hopefully that
will be the end of the "The repo RPM is 10-4, how can I find 10-7 repo rpm, so
that I can install PostgreSQL 10.7?" type questions. We were tired of answering
that.

3. I added "latest" suffix to all repo RPMs, i.e.:

https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

This is a symlink to the actual latest repo RPM. Lots of blog posts / automated
scripts were broken in the past because of pointing to no-more existing repo
packages, so apparently this will also make our lives easier in the future.

I partially updated the website to point to the new repo RPMs, will finish the
rest tomorrow.

Please let me know if you see any issues.

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

Attachment

Re: New repo RPMs

From
Michael Vermaes
Date:
(Apologies for not replying to the original message directly ...)

On Thu, Apr 11, 2019 at 00:20 AM Devrim Gündüz <devrim(at)gunduz(dot)org> wrote:
>
> 1. Instead of having separate repo RPMs per PostgreSQL major version, we now
> have one single repo RPM that supports all supported PostgreSQL releases. This
> will make our lives easier. The new packages obsolete the current ones.
>
> 2. While working on it, bumped up the repo RPM version to 42. Hopefully that
> will be the end of the "The repo RPM is 10-4, how can I find 10-7 repo rpm, so
> that I can install PostgreSQL 10.7?" type questions. We were tired of answering
> that.

This seems like it will be a good improvement (I'll admit to being someone that
used to be confused about the relationship :)

I noticed that after updating several of our 9.6 CentOS 7 servers to the new
repo RPM, that python-psycopg2 now brings in postgresql11-libs as a dependency.
So after fully updating, both postgresql96-libs and postgresql11-libs are
installed.

Would this be expected behaviour after these changes?

Thanks.

Michael

Re: New repo RPMs

From
Ian Barwick
Date:
On 4/12/19 4:09 PM, Michael Vermaes wrote:
> (Apologies for not replying to the original message directly ...)
> 
> On Thu, Apr 11, 2019 at 00:20 AM Devrim Gündüz <devrim(at)gunduz(dot)org> wrote:
>>
>> 1. Instead of having separate repo RPMs per PostgreSQL major version, we now
>> have one single repo RPM that supports all supported PostgreSQL releases. This
>> will make our lives easier. The new packages obsolete the current ones.
>>
>> 2. While working on it, bumped up the repo RPM version to 42. Hopefully that
>> will be the end of the "The repo RPM is 10-4, how can I find 10-7 repo rpm, so
>> that I can install PostgreSQL 10.7?" type questions. We were tired of answering
>> that.
> 
> This seems like it will be a good improvement (I'll admit to being someone that
> used to be confused about the relationship :)

It's certainly very useful to have a single canonical URL to point to when
installing the repo RPM.

> I noticed that after updating several of our 9.6 CentOS 7 servers to the new
> repo RPM, that python-psycopg2 now brings in postgresql11-libs as a dependency.
> So after fully updating, both postgresql96-libs and postgresql11-libs are
> installed.
> 
> Would this be expected behaviour after these changes?

This had me wondering too - while provisioning a fresh VM running Pg10,
installing "python-psycopg2" immediately after installing the repo RPM
(from the Pg10 directory) resulted in this:

     Loaded plugins: fastestmirror
     Loading mirror speeds from cached hostfile
       (...)
     Resolving Dependencies
     --> Running transaction check
     ---> Package python-psycopg2.x86_64 0:2.7.5-1.rhel7.1 will be installed
     --> Processing Dependency: postgresql11-libs for package: python-psycopg2-2.7.5-1.rhel7.1.x86_64
     --> Processing Dependency: libpq.so.5()(64bit) for package: python-psycopg2-2.7.5-1.rhel7.1.x86_64
     --> Running transaction check
     ---> Package postgresql11-libs.x86_64 0:11.2-2PGDG.rhel7 will be installed
     --> Finished Dependency Resolution

     Dependencies Resolved

     ================================================================================
      Package                 Arch         Version                Repository    Size
     ================================================================================
     Installing:
      python-psycopg2         x86_64       2.7.5-1.rhel7.1        pgdg11       155 k
     Installing for dependencies:
      postgresql11-libs       x86_64       11.2-2PGDG.rhel7       pgdg11       360 k

     Transaction Summary
     ================================================================================
     Install  1 Package (+1 Dependent package)

     Total download size: 515 k
     Installed size: 1.9 M
     Downloading packages:
     Public key for postgresql11-libs-11.2-2PGDG.rhel7.x86_64.rpm is not installed
     --------------------------------------------------------------------------------
     Total                                              240 kB/s | 515 kB  00:02
     Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-11

The installed key here is "/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10".

I was able to work around this by installing the "postgresql10-libs" package before
"python-psycopg2" (which then pulled in the "postgresql11-libs" package with no issues),
but it ain't pretty :(.


Regards

Ian Barwick


-- 
  Ian Barwick                   https://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services



Re: New repo RPMs

From
Gabriele Bartolini
Date:
Hi Devrim,

On Thu, 11 Apr 2019 at 02:21, Devrim Gündüz <devrim@gunduz.org> wrote:
1. Instead of having separate repo RPMs per PostgreSQL major version, we now
have one single repo RPM that supports all supported PostgreSQL releases. This
will make our lives easier. The new packages obsolete the current ones.

I have noticed that version 10 folder (https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/) still contains the pgdg-redhat10 package, while the 11 one (https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/) doesn't. I see that version 9.6, 9.5 and 9.4 do have that file.

What is the expected behaviour? It is important to know if the file stays there or not, so that existing configuration managers or automation tools (I am thinking of Ansible playbooks) that are used to recreate systems from scratch are not impacted.

Please advise.

Thanks, 
Gabriele
--
Gabriele Bartolini - Head of Global Support
PostgreSQL Training, Services and Support
gabriele.bartolini@2ndQuadrant.com | www.2ndQuadrant.com

Re: New repo RPMs

From
Devrim Gündüz
Date:
Hi Gabriele,

On Tue, 2019-04-16 at 14:20 +0200, Gabriele Bartolini wrote:

> I have noticed that version 10 folder (
> https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/)
> still contains the pgdg-redhat10 package, while the 11 one (
> https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/)
> doesn't. I see that version 9.6, 9.5 and 9.4 do have that file.

They are more consistent now -- main repo will pick them up in 1 hour.

> What is the expected behaviour? It is important to know if the file stays
> there or not, so that existing configuration managers or automation tools
> (I am thinking of Ansible playbooks) that are used to recreate systems from
> scratch are not impacted.

I just created symlinks to the previous repo RPMs. At least you won't get 404
(if you get, please let me know). I hope that will pour down some cold water
over the fire.

Regards,

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

Attachment

Re: New repo RPMs

From
Devrim Gündüz
Date:
Hi,

Apologies for the top posting.

Technically installing v11 libs and v10 libs should just work. However, I
accept that this problem is annoying.

I am planning to split libpq into a separate package:

https://www.postgresql.org/message-id/48da0a32718717f7f9df101e69ebb7e246c9b261.camel%40gunduz.org

I *think* that will solve this issue as well.

Regards, Devrim

On Mon, 2019-04-15 at 11:01 +0900, Ian Barwick wrote:
> On 4/12/19 4:09 PM, Michael Vermaes wrote:
> > (Apologies for not replying to the original message directly ...)
> >
> > On Thu, Apr 11, 2019 at 00:20 AM Devrim Gündüz <devrim(at)gunduz(dot)org>
> > wrote:
> > > 1. Instead of having separate repo RPMs per PostgreSQL major version, we
> > > now
> > > have one single repo RPM that supports all supported PostgreSQL releases.
> > > This
> > > will make our lives easier. The new packages obsolete the current ones.
> > >
> > > 2. While working on it, bumped up the repo RPM version to 42. Hopefully
> > > that
> > > will be the end of the "The repo RPM is 10-4, how can I find 10-7 repo
> > > rpm, so
> > > that I can install PostgreSQL 10.7?" type questions. We were tired of
> > > answering
> > > that.
> >
> > This seems like it will be a good improvement (I'll admit to being someone
> > that
> > used to be confused about the relationship :)
>
> It's certainly very useful to have a single canonical URL to point to when
> installing the repo RPM.
>
> > I noticed that after updating several of our 9.6 CentOS 7 servers to the
> > new
> > repo RPM, that python-psycopg2 now brings in postgresql11-libs as a
> > dependency.
> > So after fully updating, both postgresql96-libs and postgresql11-libs are
> > installed.
> >
> > Would this be expected behaviour after these changes?
>
> This had me wondering too - while provisioning a fresh VM running Pg10,
> installing "python-psycopg2" immediately after installing the repo RPM
> (from the Pg10 directory) resulted in this:
>
>      Loaded plugins: fastestmirror
>      Loading mirror speeds from cached hostfile
>        (...)
>      Resolving Dependencies
>      --> Running transaction check
>      ---> Package python-psycopg2.x86_64 0:2.7.5-1.rhel7.1 will be installed
>      --> Processing Dependency: postgresql11-libs for package: python-
> psycopg2-2.7.5-1.rhel7.1.x86_64
>      --> Processing Dependency: libpq.so.5()(64bit) for package: python-
> psycopg2-2.7.5-1.rhel7.1.x86_64
>      --> Running transaction check
>      ---> Package postgresql11-libs.x86_64 0:11.2-2PGDG.rhel7 will be
> installed
>      --> Finished Dependency Resolution
>
>      Dependencies Resolved
>
>      ========================================================================
> ========
>       Package                 Arch         Version                Repository
>    Size
>      ========================================================================
> ========
>      Installing:
>       python-psycopg2         x86_64       2.7.5-
> 1.rhel7.1        pgdg11       155 k
>      Installing for dependencies:
>       postgresql11-libs       x86_64       11.2-
> 2PGDG.rhel7       pgdg11       360 k
>
>      Transaction Summary
>      ========================================================================
> ========
>      Install  1 Package (+1 Dependent package)
>
>      Total download size: 515 k
>      Installed size: 1.9 M
>      Downloading packages:
>      Public key for postgresql11-libs-11.2-2PGDG.rhel7.x86_64.rpm is not
> installed
>      ----------------------------------------------------------------------
> ----------
>      Total                                              240 kB/s | 515
> kB  00:02
>      Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-11
>
> The installed key here is "/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10".
>
> I was able to work around this by installing the "postgresql10-libs" package
> before
> "python-psycopg2" (which then pulled in the "postgresql11-libs" package with
> no issues),
> but it ain't pretty :(.
>
>
> Regards
>
> Ian Barwick
>
>

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

Attachment

Re: New repo RPMs

From
Gabriele Bartolini
Date:
Hi Devrim,

> They are more consistent now -- main repo will pick them up in 1 hour.

Ok. Thanks.

> I just created symlinks to the previous repo RPMs. At least you won't get
> 404
> (if you get, please let me know). I hope that will pour down some cold
> water
> over the fire.

Thanks. This will probably allow the remaining Ansible playbooks or Puppet modules in the world that have not been modified in the meantime to work again. ;)

I have one question. I see that now all available PostgreSQL repositories are installed. This introduces a change in existing systems that until last week had only one single repository (e.g. pgdg10). They now find they have four additional ones (i.e.: pgdg94, pgdg95, pgdg96 and pgdg11).

Can you please confirm that this is a desired effect? Is this just an interim solution (an intermediate step towards a true single repository, for example) or a permanent/stable one?

Thanks,
Gabriele