Bug 2416111

Summary: Remove definition of symbol PQservice from libpq to follow upstream since Postgres 18beta2
Product: [Fedora] Fedora Reporter: Hans Buschmann <buschmann>
Component: libpqAssignee: Filip Januš <fjanus>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 43CC: anezbeda, fjanus, ndavidov, ondrej.sloup, pkubat, praiskup, v.pupillo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hans Buschmann 2025-11-20 14:35:19 UTC
Description of problem:

Postgres development added the symbol PQservice in PostgreSQL 18 beta1, but removed it later in PostgreSQL 18 beta2 and later versions

See Beta2 release notes:

https://www.postgresql.org/about/news/postgresql-18-beta-2-released-3103/

This false symbol breaks compatibility to libpq from pgdg_common repository

libpq5.x86_64 18.1-1PGDG.f43 pgdg-common

This violates the ABI for libpq since it is a non existing entry point.

The extra symbol causes a failure to load pgsql module in php85 when used with the pgdg libpq library.

For a long time (> 5 years, up to fedora 42) the combination of php linked by remi collet repositories and libpq5 from pgdg_common worked flawlessly.


In source code this can be confirmed by looking into 

pg18_1\src\interfaces\libpq\libpq-fe.h

at about line 399/400, where the external declaratioon of PQservice was removed
(when compared to pg18 beta1)

Inside the fedora supplied libpq the PQservice symbol can be found as 

0000000000004d30 T PQservice@@RHPG_18

with command nm -gD /usr/lib64/libpq.so.5.18


Version-Release number of selected component (if applicable):

Occured at version 18.0, but the same for all later versions like 18.1

How reproducible:

always

Steps to Reproduce:
1. Install postgreSQL repository from their website
2. sudo dnf install libpq5
3. sudo dnf install php85-php php85-php-fpm php85-php-cli php85-php-opcache php85-php-zip php85-php-imagick php85-php-mbstring php85-php-pgsql php85-php-gd
4. php85 -i

Actual results:

PHP Warning:  PHP Startup: Unable to load dynamic library 'pgsql' (tried: /opt/remi/php85/root/usr/lib64/php/modules/pgsql (/opt/remi/php85/root/usr/lib64/php/modules/pgsql: cannot open shared object file: No such file or directory), /opt/remi/php85/root/usr/lib64/php/modules/pgsql.so (/opt/remi/php85/root/usr/lib64/php/modules/pgsql.so: undefined symbol: PQservice, version RHPG_18)) in Unknown on line 0
phpinfo()
PHP Version => 8.5.0
...

System => Linux localhost.localdomain 6.17.8-300.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 14 01:47:12 UTC 2025 
Expected results:

PHP loads pgsql library

Additional info:

Libpq should be updated to version 18.1 because of addressed security flaws in libpq (see Postgres 18.1 Release notes)

Comment 1 v.pupillo 2026-04-29 15:34:46 UTC
Hi, I'm experiencing the same issue in the newly installed Fedora 44. It's a critical issue because PHP cannot connect to the database (in our dev environment). The version of PostgreSQL we're using is the one available in the PostgreSQL repository.
PQservice was removed in the https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=fef6da9e9c8790fa915942af2ada190c33fcf98c commit.
Could you please take a look at this?

Comment 2 v.pupillo 2026-06-17 09:44:24 UTC
Any updates on that?

Comment 3 Filip Januš 2026-06-17 10:01:15 UTC
The fix should already be present in Rawhide. I will backport it into f44. But are you able to test Fedora rawhide if the fix is sufficient for your issue?