BUG #19057: Installing postgresql-15 from the repostory installs a mix of postgresql 15 and 17

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: chris(dot)woelkers(at)noaa(dot)gov
Subject: BUG #19057: Installing postgresql-15 from the repostory installs a mix of postgresql 15 and 17
Date: 2025-09-18 21:24:39
Message-ID: 19057-e8fc42a98f757e7f@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 19057
Logged by: Chris Woelkers - NOAA Federal
Email address: chris(dot)woelkers(at)noaa(dot)gov
PostgreSQL version: 15.14
Operating system: Debian 13 - Trixie
Description:

How I found the issue:
I started a new VM with a fresh install of Debian 13.1 and after some basic
setup added the postgresql apt repository. I then tried installing
postgresql-15 and postgresql-17. Afterwards I ran pg_lsclusters and only saw
version 17 listed. I checked under /etc/postgresql and /var/lib/postgresql
and the only subdirectory in each was 17. I then uninstalled both packages
plus the other postgresql dependencies and rebooted.
I then tried installing just the postgresql-15 package, plus automatic
dependencies. Afterwards I ran pg_lsclusters again and still only say 17
listed. Checking the previous directories again also shows 17 as the only
subdirectory. I ran pg_config --version and it reported the version as 15.14
as did psql --version.
Lastly I did a general search for any files or directories named postgresql,
using 'locate'. The results led me to finding that the /usr/share/postgresql
and /usr/lib/postgresql directories both list the proper version number.

Why this is an issue:
I need to transfer a v15 DB to this new server which will then have v17
installed to upgrade it. This will require both to be properly listed in
pg_lsclusters and to use the proper subdirectory names.

Steps to reproduce:
1. Start with a Debian 13 system.
2. Add the PostgreSQL APT repository.
3. Install the package "postgresql-15".
4. Run pg_lscluster to view the currently available clusters, notice the
incorrect version number.
5. List the contents of /etc/postgresql and /var/lib/postgresql. Notice the
incorrect version number.

Terminal outputs:
root(at)postgres2:/var/log/apt# apt list postgresql-15
postgresql-15/trixie-pgdg,now 15.14-1.pgdg13+1 amd64 [installed]
root(at)postgres2:/var/log/apt# apt list postgresql-17
postgresql-17/trixie-pgdg,now 17.6-1.pgdg13+1 amd64 [residual-config]
root(at)postgres2:/var/log/apt# pg_lsclusters
Ver Cluster Port Status Owner Data directory
Log file
17 main 5432 down,binaries_missing postgres /var/lib/postgresql/17/main
/var/log/postgresql/postgresql-17-main.log
root(at)postgres2:/var/log/apt# psql --version
psql (PostgreSQL) 15.14 (Debian 15.14-1.pgdg13+1)
root(at)postgres2:/var/log/apt# ls /etc/postgresql
17
root(at)postgres2:/var/log/apt# ls /var/lib/postgresql/
17

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2025-09-19 02:05:02 Re: BUG #19056: ExecInitPartitionExecPruning segfault due to NULL es_part_prune_infos
Previous Message Ashutosh Bapat 2025-09-18 15:30:34 Re: "unexpected duplicate for tablespace" problem in logical replication