timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
17.76k stars 886 forks source link

The default value for `timescaledb.license` is `apache` rather than `timescale` as the doc describes #3718

Closed Vonng closed 3 years ago

Vonng commented 3 years ago

Relevant system information:

Describe the bug

The default value for timescaledb.license is apache. While as the doc says the default value is 'timescale'

Which means the default installation & setup will fail on some 'timescale' license features. Leads to errors such as function xxx is not supported under the current "apache" license

To Reproduce Steps to reproduce the behavior:

yum install postgresql13*
yum install timescaledb_13

# select name,reset_val from pg_settings where name ~ 'timescaledb.license';
        name         | reset_val
---------------------+-----------
 timescaledb.license | apache

Expected behavior

# select name,reset_val from pg_settings where name ~ 'timescaledb.license';
        name         | reset_val
---------------------+-----------
 timescaledb.license |  timescale

Actual behavior

postgres@meta:5432/postgres=# create database tstest;
$ psql tstest
psql (13.4)
postgres@meta:5432/tstest=# CREATE EXTENSION timescaledb;
WARNING:
WELCOME TO
 _____ _                               _     ____________
|_   _(_)                             | |    |  _  \ ___ \
  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ /
  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
               Running version 2.4.2
For more information on TimescaleDB, please visit the following links:

 1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started
 2. API reference documentation: https://docs.timescale.com/api/latest
 3. How TimescaleDB is designed: https://docs.timescale.com/timescaledb/latest/overview/core-concepts

Note: Please enable telemetry to help us improve our product by running: ALTER DATABASE "tstest" SET timescaledb.telemetry_level = 'basic';

CREATE EXTENSION
Time: 158.355 ms

postgres@meta:5432/tstest=# select * from pg_settings WHERE name ~ 'timescaledb.license';
-[ RECORD 1 ]---+--------------------------------------
name            | timescaledb.license
setting         | apache
unit            | NULL
category        | Customized Options
short_desc      | TimescaleDB license type
extra_desc      | Determines which features are enabled
context         | superuser
vartype         | string
source          | default
min_val         | NULL
max_val         | NULL
enumvals        | NULL
boot_val        | apache
reset_val       | apache
sourcefile      | NULL
sourceline      | NULL
pending_restart | f

postgres@meta:5432/tstest=# select version();
-[ RECORD 1 ]----------------------------------------------------------------------------------------------------
version | PostgreSQL 13.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit

Screenshots

Additional context

nikkhils commented 3 years ago

@Vonng can you please run and show the output of:

SELECT * from pg_settings where name ~ 'timescaledb.license';

or

SHOW timescaledb.license?

Vonng commented 3 years ago
postgres@meta:5432/a=# select * from pg_settings WHERE name ~ 'timescaledb.license';
-[ RECORD 1 ]---+--------------------------------------
name            | timescaledb.license
setting         | apache
unit            | NULL
category        | Customized Options
short_desc      | TimescaleDB license type
extra_desc      | Determines which features are enabled
context         | superuser
vartype         | string
source          | default
min_val         | NULL
max_val         | NULL
enumvals        | NULL
boot_val        | apache
reset_val       | apache
sourcefile      | NULL
sourceline      | NULL
pending_restart | f

Besides. CentOS 7.8.2003 x86_64 & timescaledb 2.1 behave the same (apache by default).

@Vonng can you please run and show the output of:

SELECT * from pg_settings where name ~ 'timescaledb.license';

or

SHOW timescaledb.license?

mfreed commented 3 years ago

I believe this arises because @Vonng installed TimescaleDB via the Postgres GDG repositories, rather than Timescale repositories.

Installation method: yum (via official pgdg13 repo)

Unfortunately, there's a naming conflict:

If you'd like to install TimescaleDB via our builds, we recommend following these instructions:

https://docs.timescale.com/timescaledb/latest/how-to-guides/install-timescaledb/self-hosted/rhel-centos/installation-yum/#installation-yum

Vonng commented 3 years ago

Thanks for your reply. It do solves the problem (install via timescale_timescaledb repo).

The rpm in pgdg repo has a confusing name, and I could not find timescaledb-tsl or any timescale licensed version in it. It would be great if it keeps up with your repo. 😆

I believe this arises because @Vonng installed TimescaleDB via the Postgres GDG repositories, rather than Timescale repositories.

Installation method: yum (via official pgdg13 repo)

Unfortunately, there's a naming conflict:

  • Timescale uses timescaledb to mean the Community edition, and timescaledb-oss to mean the Apache2 edition.
  • Postgres GDG uses timescaledb for the Apache2 edition, while they ship timescaledb-tsl as the Community edition.

If you'd like to install TimescaleDB via our builds, we recommend following these instructions:

https://docs.timescale.com/timescaledb/latest/how-to-guides/install-timescaledb/self-hosted/rhel-centos/installation-yum/#installation-yum

mfreed commented 3 years ago

@Vonng I agree the naming is confusing! I wish I had an obvious fix =)

https://twitter.com/michaelfreedman/status/1397641632552570880

image