Skip to content

Add TimescaleDB extension support#73

Open
shusaan wants to merge 9 commits intocloudnative-pg:mainfrom
shusaan:timescaledb
Open

Add TimescaleDB extension support#73
shusaan wants to merge 9 commits intocloudnative-pg:mainfrom
shusaan:timescaledb

Conversation

@shusaan
Copy link
Contributor

@shusaan shusaan commented Jan 11, 2026

This PR adds support for the timescaledb extension to the postgres-extensions-containers project.

This PR supersedes #30 and incorporates the same changes, addressing the feedback and discussion from that PR.

Closes #58

Changes

  • Added timescaledb directory with Dockerfile and metadata.hcl
  • Updated CI/CD workflows to include timescaledb in the build pipeline

@shusaan shusaan requested review from a team and NiccoloFei as code owners January 11, 2026 13:37
@gbartolini
Copy link
Contributor

Hi @shusaan, can you please resubmit the PR by following the scaffolding instructions and then the local testing part in the BUILD.md file? Thanks.

@gbartolini
Copy link
Contributor

Hi @shusaan, can you please update your PR using the new scaffolding procedure and making sure you test it? Also, please use the official PGDG packages, as they are available there (we prefer the Postgres official source).

Finally, can you please write some smoke tests that verify that Timescale is installed? (look at the PostGIS extension for examples).

@shusaan
Copy link
Contributor Author

shusaan commented Feb 15, 2026

Hi @gbartolini,

I've investigated using PGDG packages for TimescaleDB as requested.

The issue: The PGDG package postgresql-18-timescaledb contains both Apache 2.0 and TSL (Timescale License) code. There is no Apache 2.0-only package available in the official PGDG repository.

I verified this by running:

apt-cache policy postgresql-18-timescaledb    # Available in PGDG
apt-cache policy timescaledb-2-oss-postgresql-18  # Not found

The Apache 2.0-only packages (timescaledb-2-oss-postgresql-*) are only available from TimescaleDB's own repository (packagecloud.io), not from PGDG.

Options:

Keep using TimescaleDB's repository with the OSS package (current approach). Here is discussion about TimescaleDB License.

What do you suggest?

@gugu
Copy link

gugu commented Feb 17, 2026

postgresql-18-timescaledb is OSS version. I haven't found TSL version in PGDG APT, but found it in a separate repo for redhat-based distros: https://download.postgresql.org/pub/repos/yum/non-free/18/redhat/rhel-10-x86_64/

Also, I am not sure TSL license allows such manipulations, so it should be a political decision about inclusion of TSL version.

@shusaan
Copy link
Contributor Author

shusaan commented Feb 18, 2026

Hi @gbartolini I've updated the PR as per the requirements. Please let me know if any further changes are needed.
Thank You

@gbartolini
Copy link
Contributor

Hi @shusaan I will, thanks for the contribution.

Signed-off-by: Husn E Rabbi <shussan@gmail.com>
Signed-off-by: Husn E Rabbi <shussan@gmail.com>
Includes smoke tests for hypertable functionality and uses Apache 2.0-only packages from TimescaleDB repository

Signed-off-by: Husn E Rabbi <shussan@gmail.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
@gbartolini
Copy link
Contributor

I have opened a support ticket within the CNCF to get legal advice before merging. Thanks for your patience.

@gbartolini
Copy link
Contributor

@shusaan, regarding your PR, I have made some minor changes, primarily formatting but also renaming the extension (not on the SQL level though). I have renamed it timescaledb-oss, which will also be the image's tag. I have added you as a CODEOWNER for that folder.

@gbartolini
Copy link
Contributor

In the meantime, I confirm what @gugu was saying.

Start a container:

docker run -ti --rm --user 0 ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie

Then:

apt update
apt show postgresql-18-timescaledb

I get this:

Package: postgresql-18-timescaledb
Version: 2.25.1+dfsg-1.pgdg13+1
Priority: optional
Section: database
Source: timescaledb
Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Installed-Size: 14.3 MB
Depends: postgresql-18, libc6 (>= 2.38)
Homepage: https://github.com/timescale/timescaledb
Download-Size: 383 kB
APT-Sources: https://apt.postgresql.org/pub/repos/apt trixie-pgdg/main arm64 Packages
Description: time-series SQL database optimized for fast ingest and complex queries
 TimescaleDB is an open-source database designed to make SQL scalable for
 time-series data. It is engineered up from PostgreSQL and packaged as a
 PostgreSQL extension, providing automatic partitioning across time and space
 (partitioning key), as well as full SQL support.
 .
 This package contains the Apache-licensed version of timescaledb.

The last line says: This package contains the Apache-licensed version of timescaledb.

I proceeded installing the package and checked the copyright file, which is very clear:

cat /usr/share/doc/postgresql-18-timescaledb/copyright

Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: timescaledb
Source: https://github.com/timescale/timescaledb
Files-Excluded:
 tsl
 scripts/c_license_header-timescale.h
 scripts/license_tsl.spec
 scripts/sql_license_tsl.sql

Files: *
Copyright:
 Copyright (c) 2017-2022  Timescale, Inc. All Rights Reserved.
 Copyright (c) 2016-2017  440 Labs, Inc. dba Timescale. All Rights Reserved.
 Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
 Portions Copyright (c) 1994, The Regents of the University of California
License: Apache-2.0 and PostgreSQL
 Source code in this repository is variously licensed under the Apache License
 Version 2.0, an Apache compatible license, or the Timescale License.
 .
 All source code should have information at the beginning of its respective file
 which specifies its licensing information.
 .
 * Outside of the "tsl" directory, source code in a given file is licensed
   under the Apache License Version 2.0, unless otherwise noted (e.g., an
   Apache-compatible license).
 .
 * Within the "tsl" folder, source code in a given file is licensed under the
   Timescale License, unless otherwise noted.
 .
   The tsl folder has been removed when creating the +dfsg orig tarballs for
   Debian. No tsl-licensed code remains.
 .
 Certain files in this code base have been modified and/or copied,
 either partially or wholely, from source code from the PostgreSQL
 database management system

License: Apache-2.0
 On Debian systems, the Apache 2.0 license is located in
 /usr/share/common-licenses/Apache-2.0.

License: PostgreSQL
 Permission to use, copy, modify, and distribute this software and its
 documentation for any purpose, without fee, and without a written agreement
 is hereby granted, provided that the above copyright notice and this
 paragraph and the following two paragraphs appear in all copies.
 .
 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
 LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
 DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 .
 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
 PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

As a result, I would prefer to stick with the PGDG package @shusaan. Do you think you can do that? (please pull my changes first, thanks).

Signed-off-by: Husn E Rabbi <shussan@gmail.com>
@shusaan
Copy link
Contributor Author

shusaan commented Feb 20, 2026

In the meantime, I confirm what @gugu was saying.

Start a container:

docker run -ti --rm --user 0 ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie

Then:

apt update
apt show postgresql-18-timescaledb

I get this:

Package: postgresql-18-timescaledb
Version: 2.25.1+dfsg-1.pgdg13+1
Priority: optional
Section: database
Source: timescaledb
Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Installed-Size: 14.3 MB
Depends: postgresql-18, libc6 (>= 2.38)
Homepage: https://github.com/timescale/timescaledb
Download-Size: 383 kB
APT-Sources: https://apt.postgresql.org/pub/repos/apt trixie-pgdg/main arm64 Packages
Description: time-series SQL database optimized for fast ingest and complex queries
 TimescaleDB is an open-source database designed to make SQL scalable for
 time-series data. It is engineered up from PostgreSQL and packaged as a
 PostgreSQL extension, providing automatic partitioning across time and space
 (partitioning key), as well as full SQL support.
 .
 This package contains the Apache-licensed version of timescaledb.

The last line says: This package contains the Apache-licensed version of timescaledb.

I proceeded installing the package and checked the copyright file, which is very clear:

cat /usr/share/doc/postgresql-18-timescaledb/copyright

Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: timescaledb
Source: https://github.com/timescale/timescaledb
Files-Excluded:
 tsl
 scripts/c_license_header-timescale.h
 scripts/license_tsl.spec
 scripts/sql_license_tsl.sql

Files: *
Copyright:
 Copyright (c) 2017-2022  Timescale, Inc. All Rights Reserved.
 Copyright (c) 2016-2017  440 Labs, Inc. dba Timescale. All Rights Reserved.
 Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
 Portions Copyright (c) 1994, The Regents of the University of California
License: Apache-2.0 and PostgreSQL
 Source code in this repository is variously licensed under the Apache License
 Version 2.0, an Apache compatible license, or the Timescale License.
 .
 All source code should have information at the beginning of its respective file
 which specifies its licensing information.
 .
 * Outside of the "tsl" directory, source code in a given file is licensed
   under the Apache License Version 2.0, unless otherwise noted (e.g., an
   Apache-compatible license).
 .
 * Within the "tsl" folder, source code in a given file is licensed under the
   Timescale License, unless otherwise noted.
 .
   The tsl folder has been removed when creating the +dfsg orig tarballs for
   Debian. No tsl-licensed code remains.
 .
 Certain files in this code base have been modified and/or copied,
 either partially or wholely, from source code from the PostgreSQL
 database management system

License: Apache-2.0
 On Debian systems, the Apache 2.0 license is located in
 /usr/share/common-licenses/Apache-2.0.

License: PostgreSQL
 Permission to use, copy, modify, and distribute this software and its
 documentation for any purpose, without fee, and without a written agreement
 is hereby granted, provided that the above copyright notice and this
 paragraph and the following two paragraphs appear in all copies.
 .
 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
 LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
 DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 .
 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
 PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

As a result, I would prefer to stick with the PGDG package @shusaan. Do you think you can do that? (please pull my changes first, thanks).

@gbartolini I have updated, please check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Extension]: TimescaleDB

3 participants

Comments