openSUSE Leap 16.0: PostgreSQL 15 PGDG RPM pulls PostgreSQL 18/Babelfish due to user(postgres) and group(postgres) dependencies

Hello openSUSE Community,

I am testing PostgreSQL 15 installation on openSUSE Leap 16.0 (x86_64) using the official PostgreSQL PGDG repository.

When attempting to install postgresql15-server , Zypper unexpectedly selects PostgreSQL 18-based Babelfish packages.

1. Installation dry run

zypper install --dry-run --no-recommends --from pgdg15 postgresql15-server

Output:

The following 6 NEW packages are going to be installed:
  babelfish_postgresql18
  babelfish_postgresql18-libs
  babelfish_postgresql18-server
  postgresql15
  postgresql15-libs
  postgresql15-server

2. PostgreSQL 15 RPM dependencies

Package: postgresql15-server-15.19-420001PGDG.lp16.0.x86_64

Requires:
  group(postgres)
  user(postgres)
  /usr/sbin/groupadd
  /usr/sbin/useradd

3. Available providers

zypper what-provides 'user(postgres)'
zypper what-provides 'group(postgres)'

Both commands return:

babelfish_postgresql18-server
postgresql-server
postgresql17-server
postgresql18-server

PostgreSQL 15 is not listed.

4. PostgreSQL 15 already has a preinstall script

rpm -qp --scripts postgresql15-server-15.19-420001PGDG.lp16.0.x86_64.rpm

The %pre script contains:

# This is replaced by sysusers.d in recent OSes:
groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
useradd -M -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
        -c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :

However, rpm -qp --provides confirms that postgresql15-server does not provide user(postgres) or group(postgres) .

5. Additional checks

  • No system-user-postgres package was found.
  • The openSUSE Leap 16.0 repository provides unversioned postgresql-server packages at versions 17 and 18.
  • The same unexpected cross-version dependency behavior was observed when using our internal repository mirror.

Questions:

  1. Is this a known PostgreSQL 15 RPM packaging issue on Leap 16.0?
  2. Why does postgresql15-server require user(postgres) and group(postgres) without providing these capabilities, despite having a preinstall script to create the account?
  3. Is there an officially supported package or workaround to satisfy these dependencies without installing PostgreSQL 17, PostgreSQL 18, or Babelfish?
  4. Should this be reported to the PGDG RPM maintainers or the openSUSE packaging team?

Our requirement is to install PostgreSQL 15 only , without pulling another PostgreSQL major version.

Any guidance or an officially supported solution would be appreciated.

Thank you.

None of the packages seem to come from a standard openSUSE repository.

So I guess the maintainers op that repository are to be contacted.

I see that Leap 16.0 has PostgreSQL 18, thus anything 15 has no “official” status.

Why can you not use the standard repo-oss postgresql15-server 15.19-160000.1.1 version?

I should have looked better. In fact a whole lot of versions, including 15 are in the OSS repo (as @malcolmlewis hints at).

Hi All,

Thank you for the suggestions.

I verified that the standard openSUSE Leap 16.0 repository provides postgresql15-server-15.19-160000.1.1 , while the PGDG repository provides postgresql15-server-15.19-420001PGDG.lp16.0 .

The SUSE package uses a different dependency model and requires:

postgresql = 15.19
postgresql-noarch >= 18
postgresql-server-noarch >= 18
libpq5 >= 15.19

The available unversioned postgresql and postgresql-server packages in the Leap 16.0 repository are currently versioned 17 and 18. The postgresql package at version 18 provides postgresql-noarch = 18-160000.1.1 .

Our requirement is to install PostgreSQL 15 from an internal repository containing PGDG packages, without pulling PostgreSQL 17/18 server packages or Babelfish.

The PGDG PostgreSQL 15 RPM has user(postgres) and group(postgres) dependencies, and dependency resolution has selected unwanted packages when attempting installation.

Although the standard openSUSE repository contains PostgreSQL 15, using its distribution RPM would change our intended package source.

For now, we are proceeding with PostgreSQL 17 and 18 on Leap 16.0 while keeping PostgreSQL 15/16 installation under review.

Is there a recommended standalone package or packaging mechanism for satisfying user(postgres) and group(postgres) with PGDG PostgreSQL 15 on Leap 16.0, without installing another PostgreSQL server version?

Also i created a noarch rpm with only postgres user and group it didnt pull anything and it worked, but thats not correct way.

/usr/src/packages/RPMS/noarch/postgresql-account-provider-1.0-1.noarch.rpm
/root/rpmbuild/SPECS/postgresql-account-provider.spec

cat /root/rpmbuild/SPECS/postgresql-account-provider.spec

Name: postgresql-account-provider
Version: 1.0
Release: 1
Summary: PostgreSQL system account RPM capability provider
License: MIT
BuildArch: noarch

Provides: user(postgres)
Provides: group(postgres)

%description
Provides RPM capabilities for the existing PostgreSQL
system user and group on openSUSE Leap 16.

%pre
getent group postgres >/dev/null || exit 1
getent passwd postgres >/dev/null || exit 1

Please advice.

Also, Could you please clarify whether PostgreSQL 15 and 16 are officially unsupported or have had their support removed in openSUSE Leap 16.0?

Since PostgreSQL 15 and 16 packages are still available in the official openSUSE Leap 16.0 repositories, does this mean they continue to receive security updates and maintenance, or are only PostgreSQL 17 and 18 officially supported?

Regards,
Dhanesh M.

Hi
It’s your system(s) you get to do anything you like :wink: Perhaps a bug report for a separate systemd postgres user/group package may be appropriate. But that would likely be another 18 months before it appears in Leap 16.2.

Did you try installing with the --no-recommends option?

Yes, packages in the openSUSE Leap 16 series will support and backport security fixes. However, Leap 16.1 will drop next week so check the release notes…
https://en.opensuse.org/Release_announcement_16.1