TimecaleDB 2.9.2 not working with the Percona package

I see there was a similar issue previously.

The new version added a version to the dependency on postgresql-15 and it seems like the Percona package does not indicate a version with the “Provides: postgresql-15”

# apt install percona-postgresql-15 timescaledb-2-postgresql-15
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 timescaledb-2-postgresql-15 : Depends: timescaledb-2-loader-postgresql-15 (>= 2.9.2~) but it is not going to be installed
                               Depends: postgresql-15 (>= 15.1)
                               Recommends: timescaledb-tools but it is not going to be installed
                               Recommends: timescaledb-toolkit-postgresql-15 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What seems to be the relevant part:

# apt install percona-postgresql-15 timescaledb-2-loader-postgresql-15
<snip>
The following packages have unmet dependencies:
 timescaledb-2-loader-postgresql-15 : Depends: postgresql-15 (>= 15.1)
                                      Recommends: timescaledb-tools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Likely relevant:

 # apt show percona-postgresql-15
Package: percona-postgresql-15
Version: 2:15.1-1.jammy
Priority: optional
Section: database
Maintainer: Percona Development Team <info@percona.com>
Installed-Size: 54.0 MB
Provides: percona-postgresql-contrib-15, postgresql-15, postgresql-contrib-15
Depends: locales | locales-all, percona-postgresql-client-15, percona-postgresql-common (>= 182~), ssl-cert, tzdata, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.34), libgcc-s1 (>= 3.3.1), libgssapi-krb5-2 (>= 1.14+dfsg), libicu70 (>= 70.1-1~), libldap-2.5-0 (>= 2.5.4), libllvm11 (>= 1:9~svn298832-1~), liblz4-1 (>= 0.0~r130), libpam0g (>= 0.99.7.1), libpq5 (>= 14~~), libselinux1 (>= 3.1~), libssl3 (>= 3.0.0~~alpha1), libstdc++6 (>= 11), libsystemd0, libuuid1 (>= 2.16), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Recommends: sysstat
Homepage: http://www.postgresql.org/
Postgresql-Catversion: 202209061
Download-Size: 23.7 MB
APT-Sources: http://repo.percona.com/ppg-15/apt jammy/main amd64 Packages
Description: <snip>

2.9.1 of this worked, 2.9.2 fails: (note the difference in the postgresql-15 dependency)

# apt show timescaledb-2-loader-postgresql-15 -a
Package: timescaledb-2-loader-postgresql-15
Version: 2.9.2~ubuntu22.04
Priority: optional
Section: database
Source: timescaledb-2-2.9.2-postgresql-15
Maintainer: Timescale <hello@timescale.com>
Installed-Size: 273 kB
Depends: postgresql-15 (>= 15.1), libc6 (>= 2.4)
Recommends: timescaledb-tools
Homepage: https://timescale.com
Download-Size: 105 kB
APT-Sources: https://packagecloud.io/timescale/timescaledb/ubuntu jammy/main amd64 Packages
Description: <snip>.

Package: timescaledb-2-loader-postgresql-15
Version: 2.9.1~ubuntu22.04
Priority: optional
Section: database
Source: timescaledb-2-2.9.1-postgresql-15
Maintainer: Timescale <hello@timescale.com>
Installed-Size: 273 kB
Depends: postgresql-15, libc6 (>= 2.4)
Recommends: timescaledb-tools
Homepage: https://timescale.com
Download-Size: 105 kB
APT-Sources: https://packagecloud.io/timescale/timescaledb/ubuntu jammy/main amd64 Packages
Description: <snip>

I’m not sure how DISTPG-320 was resolved - that seems like it was exactly the same issue (I couldn’t find it in the commit log - it is possible that the fix was only for one branch?)

Hi,

our package is called “percona-postgresql-15” and not “postgresql-15”, that’s why timescaledb can’t resolve the conflict.

We don’t support timescaledb as part of our distribution, that’s why we don’t have our own build of it in our repositories.

Kai

It seems like the “Provides” can indicate a version (and does not in this case - if apt show can be trusted), which seems to be the problem here. (since Timescale’s package is looking for a specific postgres-15, but the Percona one only indicates that it provides that, without specifying the version.

(I’m not sure if that was the fix last time it came up)

Good point, let me check that please, and thanks for brining up the linked issue.

I’ve created an issue to keep track of it [DISTPG-551] TimescaleDB not working with the Percona packages - Percona JIRA.

We need to validate first if this happens against all versions or only for PG15 to address this accordingly.

1 Like

Thanks. I think it likely depends on how third-party packages depend on postgresql-xx. If they specify the version it seems to fail, if they don’t (i.e. they are fine with any Postgresql xx.* version) it should work.

(I have another packaging issue, when enabling both the PostgreSQL PGDG repo (for PostgreSQL, due to this issue, but it likely applies to OS postgresql packages as well) and the Percona one (for a more up to date Patroni, pg_stat_monitor, etc), but that probably belongs in another thread)

Hi,

Although we can’t at this time “officially” support timescale I can however suggest that you can install the extension against the Percona PostgreSQL distribution using the standard apt invocation that forced an install irrespective of the default behaviour.

Hope this helps.

I can’t find such an option for apt(-get) (it is probably possible with dpkg directly though)

I rebuilt the package with the version added to the Provides, that solves the problem:

# apt show ./percona-postgresql-15_15.1-1_amd64.deb
Package: percona-postgresql-15
Version: 15.1-1
Priority: optional
Section: database
Maintainer: Percona Development Team <info@percona.com>
Installed-Size: 54.0 MB
Provides: percona-postgresql-contrib-15, postgresql-15 (= 15.1-1), postgresql-contrib-15
Depends: locales | locales-all, percona-postgresql-client-15, percona-postgresql-common (>= 182~), ssl-cert, tzdata, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.34), libgcc-s1 (>= 3.3.1), libgssapi-krb5-2 (>= 1.14+dfsg), libicu70 (>= 70.1-1~), libldap-2.5-0 (>= 2.5.4), libllvm11 (>= 1:9~svn298832-1~), liblz4-1 (>= 0.0~r130), libpam0g (>= 0.99.7.1), libpq5 (>= 14~~), libselinux1 (>= 3.1~), libssl3 (>= 3.0.0~~alpha1), libstdc++6 (>= 11), libsystemd0, libuuid1 (>= 2.16), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Recommends: sysstat
Homepage: http://www.postgresql.org/
Postgresql-Catversion: 202209061
Download-Size: 23.7 MB
APT-Manual-Installed: yes
APT-Sources: /root/percona-postgresql/percona-postgresql-15_15.1-1_amd64.deb

So it is the version that is not present in the Provides that causes the issue. (It might make sense to addon the “contrib” stuff as well, but that was not necessary for this specific 3rd-party plugin)

Rebuild process:

  • Create a dir and CD to it
  • apt source percona-postgresql-15
  • apt build-dep percona-postgresql-15
  • apt install devscripts
  • in the percona-postgresql-15-15.1 subdir: vim debian/rules and add the version to the percona-postgres-15 package’s Provides: line
  • debuild -uc -us -b
  • cd …
  • Install the resulting deb and TimescaleDB: apt install ./percona-postgresql-15_15.1-1_amd64.deb timescaledb-2-postgresql-15
  • No errors!