Thread: libpq5 error

libpq5 error

From
Paul Brindusa
Date:
Good afternoon,

I have got a rocky 9.4 VM running psql (PostgreSQL) 15.8  version and recently unable to patc h the host due to a version mismatch of libpq5 package.

The updates get stuck when trying to install the following packages:


 libpq5                                                  x86_64                                   17.0-42PGDG.rhel9                                          pgdg-common                                   352 k
pgdg-redhat-repo                                        noarch                                   42.0-46PGDG                                                pgdg-common                                    12 k

If I disable the pg repo file in /etc/yum.repos.d they are omitted. Is there a fix to this issue?

Thank you in advance for any help you can provide.

Kind regards,
Paul

Re: libpq5 error

From
Adrian Klaver
Date:
On 10/7/24 06:45, Paul Brindusa wrote:
> Good afternoon,
> 
> I have got a rocky 9.4 VM running psql (PostgreSQL) 15.8  version and 
> recently unable to patc h the host due to a version mismatch of libpq5 
> package.

The above is somewhat confusing to me. You say that Postgres is running 
in a VM, but then say you are patching the host. To me that implies 
patching the host machine that the VM is being run on. Please explain 
this is more detail.

> 
> The updates get stuck when trying to install the following packages:

Is this an update to an existing install that came from the PGDG repo?

What is the complete error message you get?

> 
> 
>   libpq5                                                  x86_64         
>                            17.0-42PGDG.rhel9                             
>               pgdg-common                                   352 k
> pgdg-redhat-repo                                        noarch           
>                          42.0-46PGDG                                     
>             pgdg-common                                    12 k
> 
> If I disable the pg repo file in /etc/yum.repos.d they are omitted. Is 
> there a fix to this issue?
> 
> Thank you in advance for any help you can provide.
> 
> Kind regards,
> Paul

-- 
Adrian Klaver
adrian.klaver@aklaver.com
. To me



Re: libpq5 error

From
Adrian Klaver
Date:
On 10/7/24 08:23, Paul Brindusa wrote:

Please reply to list also.
Ccing list.

> Hi Adrian,
> 
> Thank you for your quick response,

I'm guessing(because I don't use RH and variants) that the below is 
related to:

https://yum.postgresql.org/news/rocky-9-8-llvm-repo-is-available/

In particular this part:

"Rocky Linux and AlmaLinux, which lags slightly behind RHEL, is also 
significantly affected by this breakage, blocking PostgreSQL minor 
updates. This is the problem that needs to be solved."

Hopefully, someone who is more knowledge about this can confirm.


> 
> Yes, the postgres(version 15.8) instance is running on a rocky 9.4 VM 
> which when trying to patch.
> When running dnf update the below 2 packages get pushed through the 
> system updates:
> 
> pgdg-redhat-repo                                        noarch           
>                          42.0-46PGDG                                     
>             pgdg-common                                    12 k
> libpq5                                                  x86_64           
>                          17.0-42PGDG.rhel9                               
>                pgdg-common                                   352 k
> 
> And these packages stop the update of the host with the following error:
> 
> Unknown Error occurred: Transaction test error:\n file 
> /usr/share/pgsql/postgres.bki from install of 
> libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package 
> postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n file 
> /usr/share/pgsql/system_constraints.sql from install of 
> libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package 
> postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n.
> 
> Apologies for the bad description in the initial message but I did not 
> find the error that was getting.
> Hope this makes more sense.
> 
> Kind Regards,
> Paul
> 
> 
> On Mon, Oct 7, 2024 at 4:10 PM Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 10/7/24 06:45, Paul Brindusa wrote:
>      > Good afternoon,
>      >
>      > I have got a rocky 9.4 VM running psql (PostgreSQL) 15.8  version
>     and
>      > recently unable to patc h the host due to a version mismatch of
>     libpq5
>      > package.
> 
>     The above is somewhat confusing to me. You say that Postgres is running
>     in a VM, but then say you are patching the host. To me that implies
>     patching the host machine that the VM is being run on. Please explain
>     this is more detail.
> 
>      >
>      > The updates get stuck when trying to install the following packages:
> 
>     Is this an update to an existing install that came from the PGDG repo?
> 
>     What is the complete error message you get?
> 
>      >
>      >
>      >   libpq5                                                  x86_64
>      >                            17.0-42PGDG.rhel9
>      >               pgdg-common                                   352 k
>      > pgdg-redhat-repo                                        noarch
>      >                          42.0-46PGDG
>      >             pgdg-common                                    12 k
>      >
>      > If I disable the pg repo file in /etc/yum.repos.d they are
>     omitted. Is
>      > there a fix to this issue?
>      >
>      > Thank you in advance for any help you can provide.
>      >
>      > Kind regards,
>      > Paul
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>     . To me
> 
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: libpq5 error

From
Paul Brindusa
Date:
Good morning,

Really appreciate the assistance with this.
I will apply the changes later on today.


On Tue, Oct 8, 2024 at 8:44 AM Devrim Gündüz <devrim@gunduz.org> wrote:
Hi,

On Mon, 2024-10-07 at 14:45 +0100, Paul Brindusa wrote:
> I have got a rocky 9.4 VM running psql (PostgreSQL) 15.8  version and
> recently unable to patc h the host due to a version mismatch of libpq5
> package.
>
> The updates get stuck when trying to install the following packages:
>
>
>  libpq5                                                  x86_64
>                       17.0-42PGDG.rhel9
>      pgdg-common                                   352 k

Packager speaking: It means libpq5 is built using PostgreSQL 17.0 and it
is backwards compatible with PostgreSQL 15. So it is ok to install it.

Regards,
--
Devrim Gündüz
Open Source Solution Architect, PostgreSQL Major Contributor
Twitter: @DevrimGunduz , @DevrimGunduzTR


--
Kind Regards,
Paul Brindusa

Re: libpq5 error

From
Paul Brindusa
Date:
 Good morning Devrim,

Is libpq5 an important component that needs the upgrade?
I am wanting to try after Adrian's suggestion yesterday to see if I can update the repo file first of all since it came with the rest of the updates.

If that does not solve it, I would consider disabling the package.

On Tue, Oct 8, 2024 at 8:48 AM Devrim Gündüz <devrim@gunduz.org> wrote:
Hi,

On Mon, 2024-10-07 at 08:44 -0700, Adrian Klaver wrote:
> > Unknown Error occurred: Transaction test error:\n file
> > /usr/share/pgsql/postgres.bki from install of
> > libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package
> > postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n file
> > /usr/share/pgsql/system_constraints.sql from install of
> > libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package
> > postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n.

Ah ok. So basically it means PostgreSQL is installed from Red Hat
packages, not PGDG. I would suggest you either not to use PGDG repos at
all for consistency, or switch to PGDG repo and use our packages as a
whole.

...or you can edit /etc/yum.repos.d/pgdg-redhat-all.repo file, and add

exclude=libpq5

under the [pgdg-common] section so that dnf will ignore that.

Regards,


--
Devrim Gündüz
Open Source Solution Architect, PostgreSQL Major Contributor
Twitter: @DevrimGunduz , @DevrimGunduzTR


--
Kind Regards,
Paul Brindusa

Re: libpq5 error

From
Adrian Klaver
Date:
On 10/8/24 01:01, Paul Brindusa wrote:
>   Good morning Devrim,
> 
> Is libpq5 an important component that needs the upgrade?

 From here:

https://www.postgresql.org/docs/current/libpq.html

"libpq is the C application programmer's interface to PostgreSQL. libpq 
is a set of library functions that allow client programs to pass queries 
to the PostgreSQL backend server and to receive the results of these 
queries.

libpq is also the underlying engine for several other PostgreSQL 
application interfaces, including those written for C++, Perl, Python, 
Tcl and ECPG. So some aspects of libpq's behavior will be important to 
you if you use one of those packages. In particular, Section 32.15, 
Section 32.16 and Section 32.19 describe behavior that is visible to the 
user of any application that uses libpq."

To me that is, yes it is important.

> I am wanting to try after Adrian's suggestion yesterday to see if I can 
> update the repo file first of all since it came with the rest of the 
> updates.
> 
> If that does not solve it, I would consider disabling the package.
> 
> On Tue, Oct 8, 2024 at 8:48 AM Devrim Gündüz <devrim@gunduz.org 
> <mailto:devrim@gunduz.org>> wrote:
> 
>     Hi,
> 
>     On Mon, 2024-10-07 at 08:44 -0700, Adrian Klaver wrote:
>      > > Unknown Error occurred: Transaction test error:\n file
>      > > /usr/share/pgsql/postgres.bki from install of
>      > > libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package
>      > > postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n
>     file
>      > > /usr/share/pgsql/system_constraints.sql from install of
>      > > libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package
>      > > postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n.
> 
>     Ah ok. So basically it means PostgreSQL is installed from Red Hat
>     packages, not PGDG. I would suggest you either not to use PGDG repos at
>     all for consistency, or switch to PGDG repo and use our packages as a
>     whole.
> 
>     ...or you can edit /etc/yum.repos.d/pgdg-redhat-all.repo file, and add
> 
>     exclude=libpq5
> 
>     under the [pgdg-common] section so that dnf will ignore that.
> 
>     Regards,
> 
> 
>     -- 
>     Devrim Gündüz
>     Open Source Solution Architect, PostgreSQL Major Contributor
>     Twitter: @DevrimGunduz , @DevrimGunduzTR
> 
> 
> 
> -- 
> Kind Regards,
> Paul Brindusa
> paulbrindusa88@gmail.com <mailto:paulbrindusa88@gmail.com>

-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: libpq5 error

From
Paul Brindusa
Date:
Hi guys,

I've just retried patching the host as we speak with no luck, I am getting the exact same thing.
Following Devrim's guidance i've manually upgraded the repo file that came down via dnf  and still getting the mismatch error:


Error: Transaction test error:
  file /usr/share/pgsql/postgres.bki from install of libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64
  file /usr/share/pgsql/system_constraints.sql from install of libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64

Any ideas?

On Tue, Oct 8, 2024 at 4:06 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 10/8/24 01:01, Paul Brindusa wrote:
>   Good morning Devrim,
>
> Is libpq5 an important component that needs the upgrade?

 From here:

https://www.postgresql.org/docs/current/libpq.html

"libpq is the C application programmer's interface to PostgreSQL. libpq
is a set of library functions that allow client programs to pass queries
to the PostgreSQL backend server and to receive the results of these
queries.

libpq is also the underlying engine for several other PostgreSQL
application interfaces, including those written for C++, Perl, Python,
Tcl and ECPG. So some aspects of libpq's behavior will be important to
you if you use one of those packages. In particular, Section 32.15,
Section 32.16 and Section 32.19 describe behavior that is visible to the
user of any application that uses libpq."

To me that is, yes it is important.

> I am wanting to try after Adrian's suggestion yesterday to see if I can
> update the repo file first of all since it came with the rest of the
> updates.
>
> If that does not solve it, I would consider disabling the package.
>
> On Tue, Oct 8, 2024 at 8:48 AM Devrim Gündüz <devrim@gunduz.org
> <mailto:devrim@gunduz.org>> wrote:
>
>     Hi,
>
>     On Mon, 2024-10-07 at 08:44 -0700, Adrian Klaver wrote:
>      > > Unknown Error occurred: Transaction test error:\n file
>      > > /usr/share/pgsql/postgres.bki from install of
>      > > libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package
>      > > postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n
>     file
>      > > /usr/share/pgsql/system_constraints.sql from install of
>      > > libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package
>      > > postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64\n.
>
>     Ah ok. So basically it means PostgreSQL is installed from Red Hat
>     packages, not PGDG. I would suggest you either not to use PGDG repos at
>     all for consistency, or switch to PGDG repo and use our packages as a
>     whole.
>
>     ...or you can edit /etc/yum.repos.d/pgdg-redhat-all.repo file, and add
>
>     exclude=libpq5
>
>     under the [pgdg-common] section so that dnf will ignore that.
>
>     Regards,
>
>
>     --
>     Devrim Gündüz
>     Open Source Solution Architect, PostgreSQL Major Contributor
>     Twitter: @DevrimGunduz , @DevrimGunduzTR
>
>
>
> --
> Kind Regards,
> Paul Brindusa
> paulbrindusa88@gmail.com <mailto:paulbrindusa88@gmail.com>

--
Adrian Klaver
adrian.klaver@aklaver.com



--
Kind Regards,
Paul Brindusa

Re: libpq5 error

From
Adrian Klaver
Date:
On 10/8/24 08:23, Paul Brindusa wrote:
> Hi guys,
> 
> I've just retried patching the host as we speak with no luck, I am 
> getting the exact same thing.
> Following Devrim's guidance i've manually upgraded the repo file that 
> came down via dnf  and still getting the mismatch error:
> 
> 
> Error: Transaction test error:
>    file /usr/share/pgsql/postgres.bki from install of 
> libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package 
> postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64
>    file /usr/share/pgsql/system_constraints.sql from install of 
> libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package 
> postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64
> 
> Any ideas?

Yes show us the exact changes you made, including the file names of the 
files changed.

-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: libpq5 error

From
Paul Brindusa
Date:
I just ran from the host dnf update -y pgdg-redhat-repo.
And retried dnf update -y libpq5  which comes back again with:

  file /usr/share/pgsql/postgres.bki from install of libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64
  file /usr/share/pgsql/system_constraints.sql from install of libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64

On Tue, Oct 8, 2024 at 4:53 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 10/8/24 08:23, Paul Brindusa wrote:
> Hi guys,
>
> I've just retried patching the host as we speak with no luck, I am
> getting the exact same thing.
> Following Devrim's guidance i've manually upgraded the repo file that
> came down via dnf  and still getting the mismatch error:
>
>
> Error: Transaction test error:
>    file /usr/share/pgsql/postgres.bki from install of
> libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package
> postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64
>    file /usr/share/pgsql/system_constraints.sql from install of
> libpq5-17.0-42PGDG.rhel9.x86_64 conflicts with file from package
> postgresql-server-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64
>
> Any ideas?

Yes show us the exact changes you made, including the file names of the
files changed.

--
Adrian Klaver
adrian.klaver@aklaver.com



--
Kind Regards,
Paul Brindusa

Re: libpq5 error

From
Adrian Klaver
Date:
On 10/8/24 08:56, Paul Brindusa wrote:
> I just ran from the host dnf update -y pgdg-redhat-repo.
> And retried dnf update -y libpq5  which comes back again with:

That is not what Devrin suggested, go back and read:

https://www.postgresql.org/message-id/0a805069f207406b6c68a023bda5a9bbcda1db16.camel%40gunduz.org



-- 
Adrian Klaver
adrian.klaver@aklaver.com




Re: libpq5 error

From
Paul Brindusa
Date:
 Right, I was thinking that I would be able to get away with updating the repo file and fixing the issue that way.
I've just checked the packages with dnf whatprovides postrgres and indeed everything is coming down from Red Hat repos:

postgresql-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64 : PostgreSQL client programs
Repo        : @System

postgresql-15.8-1.module+el9.4.0+25512+c6b50a48.x86_64 : PostgreSQL client programs
Repo        : appstream

If I were to move in getting the packages just from pgdg  we need just the [pgdg-common] block?


On Tue, Oct 8, 2024 at 5:01 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 10/8/24 08:56, Paul Brindusa wrote:
> I just ran from the host dnf update -y pgdg-redhat-repo.
> And retried dnf update -y libpq5  which comes back again with:

That is not what Devrin suggested, go back and read:

https://www.postgresql.org/message-id/0a805069f207406b6c68a023bda5a9bbcda1db16.camel%40gunduz.org



--
Adrian Klaver
adrian.klaver@aklaver.com



--
Kind Regards,
Paul Brindusa