# TimecaleDB 2.9.2 not working with the Percona package

**URL:** <https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830>\
**Category:** PostgreSQL\
**Created:** [January 30, 2023, 10:08am UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830 "2023-01-30T10:08:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gertvdb](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gertvdb](https://forums.percona.com/u/Gertvdb)\
**Post date:** [January 30, 2023, 10:08am UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/1 "2023-01-30T10:08:34Z")

</div>

I see there was a [similar issue previously](https://forums.percona.com/t/install-timescaledb/12592).

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”

```auto
# 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:

```auto
# 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:

```auto
 # 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)

```auto
# 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>

```

---

<div class="post-metadata">

**Author:** ![Gertvdb](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gertvdb](https://forums.percona.com/u/Gertvdb)\
**Post date:** [January 30, 2023, 10:12am UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/2 "2023-01-30T10:12:32Z")

</div>

I’m not sure how [DISTPG-320](https://jira.percona.com/browse/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?)

---

<div class="post-metadata">

**Author:** ![Kai\_Wagner](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kai_wagner/32/6286_2.png) [@Kai\_Wagner](https://forums.percona.com/u/Kai_Wagner)\
**Post date:** [January 30, 2023, 10:13am UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/3 "2023-01-30T10:13:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gertvdb](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gertvdb](https://forums.percona.com/u/Gertvdb)\
**Post date:** [January 30, 2023, 10:16am UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/4 "2023-01-30T10:16:43Z")

</div>

It seems like the [“Provides” can indicate a version](https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual) (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)

---

<div class="post-metadata">

**Author:** ![Kai\_Wagner](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kai_wagner/32/6286_2.png) [@Kai\_Wagner](https://forums.percona.com/u/Kai_Wagner)\
**Post date:** [January 30, 2023, 10:17am UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/5 "2023-01-30T10:17:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kai\_Wagner](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kai_wagner/32/6286_2.png) [@Kai\_Wagner](https://forums.percona.com/u/Kai_Wagner)\
**Post date:** [January 30, 2023, 4:17pm UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/6 "2023-01-30T16:17:52Z")

</div>

I’ve created an issue to keep track of it [[DISTPG-551] TimescaleDB not working with the Percona packages - Percona JIRA](https://jira.percona.com/browse/DISTPG-551).

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

---

<div class="post-metadata">

**Author:** ![Gertvdb](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gertvdb](https://forums.percona.com/u/Gertvdb)\
**Post date:** [January 30, 2023, 4:32pm UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/7 "2023-01-30T16:32:19Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Robert\_Bernier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/robert_bernier/32/1367_2.png) [@Robert\_Bernier](https://forums.percona.com/u/Robert_Bernier)\
**Post date:** [January 30, 2023, 5:05pm UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/8 "2023-01-30T17:05:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gertvdb](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gertvdb](https://forums.percona.com/u/Gertvdb)\
**Post date:** [January 31, 2023, 12:07pm UTC](https://forums.percona.com/t/timecaledb-2-9-2-not-working-with-the-percona-package/19830/9 "2023-01-31T12:07:22Z")

</div>

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:

```auto
# 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!
