Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Installation followed by TimescaleDB documentation is set as Apache 2 Edition, but can compress the table #6145

Open
igor2x opened this issue Oct 4, 2023 · 8 comments

Comments

@igor2x
Copy link

igor2x commented Oct 4, 2023

What type of bug is this?

Incorrect result

What subsystems and features are affected?

Compression

What happened?

  1. I was pointed here from the Timescale forum, potentially to be an issue.

  2. I have been following installation Linux instructions on Timescale documentation for self-host and I expected to have Community Edition installed.

  3. But in PostgreSQL on my TimescaleDB when I execute:
    \dx
    I get:

        Name | Version |   Schema   |                                     Description
-------------+---------+------------+--------------------------------------------------------------------------------------
 timescaledb | 2.12.0  | public     | Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)
  1. From above it looks like Apache 2 Edition is installed.

  2. But following the bug report 5438 and edition comparison documentation compression should not be available in Apache 2 Edition, it should only be available in Community Edition.

  3. Lets test "compression":

CREATE TABLE public.tab1 (
    time TIMESTAMPTZ NOT NULL,
    location TEXT NOT NULL,
    temperature DOUBLE PRECISION NULL,
    humidity DOUBLE PRECISION NULL
);

SELECT create_hypertable('public.tab1', 'time');

ALTER TABLE public.tab1 SET (timescaledb.compress);

and output of above commands is:

tsdb=# CREATE TABLE public.tab1 (
tsdb(#     time TIMESTAMPTZ NOT NULL,
tsdb(#     location TEXT NOT NULL,
tsdb(#     temperature DOUBLE PRECISION NULL,
tsdb(#     humidity DOUBLE PRECISION NULL
tsdb(# );
CREATE TABLE
tsdb=#
tsdb=# SELECT create_hypertable('public.tab1', 'time');
 create_hypertable
-------------------
 (8,public,tab1,t)
(1 row)

tsdb=#
tsdb=# ALTER TABLE public.tab1 SET (timescaledb.compress);
ALTER TABLE

ALTER TABLE command does not fail, like it should if this is Apache 2 Edition. Now I am wondering: Do I really have Apache 2 Edition installed?

TimescaleDB version affected

2.12.0

PostgreSQL version used

15.4

What operating system did you use?

Red Hat 8.8

What installation method did you use?

RPM

What platform did you run on?

On prem/Self-hosted

Relevant log output and stack trace

No response

How can we reproduce the bug?

See instructions in "What happened" section above.
@raulk89
Copy link

raulk89 commented Nov 7, 2023

How can I be sure that I have timescaledb community edition installed..?
I just installed it, version 2.11.2 for postgresql 15
And I have the same issue, from extension table, it shows Apache 2 Edtition

I mean, where can I even download the community edtion ?

E: I just removed timescaledb packages and extension and I installed timescaledb from postgres repo
rpm: timescaledb_15-2.11.2-1PGDG.rhel8.x86_64

zabbix=# ALTER TABLE public.tab1 SET (timescaledb.compress);
ERROR:  functionality not supported under the current "apache" license. Learn more at https://timescale.com/.
HINT:  To access all features and the best time-series experience, try out Timescale Cloud.

Previously I had timescaledb installed from this repo: https://packagecloud.io/timescale/timescaledb/
Those rpm-s

  • timescaledb-2-postgresql-15-2.11.2-0.el8.x86_64.rpm
  • timescaledb-2-loader-postgresql-15-2.11.2-0.el8.x86_64.rpm
  • timescaledb-tools-0.15.0-0.el8.x86_64.rpm

And then it worked

zabbix=# ALTER TABLE public.tab1 SET (timescaledb.compress);
ALTER TABLE

Is it safe to say, that from this repository "https://packagecloud.io/timescale/timescaledb/" we get community edition then ?

Raul

@jonatas
Copy link

jonatas commented Nov 7, 2023

Looking the code it seems that the packages it seems packagecloud distributes for both oss and tsl:

license: [ "TSL", "Apache"]

@raulk89
Copy link

raulk89 commented Nov 7, 2023

You are specifying apt-packages.yml file. Is it same for rhel8 as well ?
I have RHEL8 distribution (Rocky 8 Linux)

Raul

@jonatas
Copy link

jonatas commented Nov 8, 2023

Hi @raulk89 , seems the same

rpm_tests:
name: RPM ${{ matrix.image }} PG${{ matrix.pg }} ${{ matrix.license }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
image: [ "centos:centos7", "rockylinux:8", "rockylinux:9" ]

@igor2x
Copy link
Author

igor2x commented Nov 9, 2023

@jonatas, thanks for digging into code.

Is it possible to look into my first post? I installed TimescaleDB on self-host following official documentation. Looking into extension information with \dx command it is displayed "Apache 2" license and I can compress the table. According to license documentation this does not make sense to me.

One of the following is true:

  • I have actually Community edition installed, but there is wrong label of Apache 2 license displayed in \dx
  • There are errors in documentation and with Apache 2 license you can also create a table compression.
  • As always possible, I've done something incorrectly and/or I just don't understand this license assignment.

@jonatas
Copy link

jonatas commented Nov 17, 2023

AFAIU, It's not a problem at your end. It seems like a bug in the building system.

@igor2x
Copy link
Author

igor2x commented Dec 12, 2023

Quick update. I retested:

  • Red Hat 8.9
  • PostgreSQL v15.5
  • TimescaleDB 2.13.0

I did the test from my first post (create table and compress it), but \dx command still displays "Apache 2 Edition", despite I can compress the table and installed TimescaleDB from official repo:

                                               List of installed extensions
    Name     | Version |   Schema   |                                     Description
-------------+---------+------------+--------------------------------------------------------------------------------------
 timescaledb | 2.13.0  | public     | Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)

@whg-gauravj
Copy link

Folks, is there any update on this?
Or can anyone tell me the RPMs to download for Community version?

Thanks

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

No branches or pull requests

5 participants