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

Cannot upgrade timescale with ALTER EXTENSION #3286

Closed
mfundul opened this issue May 27, 2021 · 1 comment · Fixed by #3288
Closed

Cannot upgrade timescale with ALTER EXTENSION #3286

mfundul opened this issue May 27, 2021 · 1 comment · Fixed by #3288
Assignees
Labels

Comments

@mfundul
Copy link
Contributor

mfundul commented May 27, 2021

Relevant system information:

  • OS: CentOS Linux release 8.3.2011
  • postgres (PostgreSQL) 13.3
  • Timescale 2.2.0 => Timescale 2.3.0
  • Installation method: dnf

Describe the bug
When I execute ALTER EXTENSION timescaledb UPDATE TO "2.3.0"; it fails with:

postgres=# ALTER EXTENSION timescaledb UPDATE TO "2.3.0";
ERROR:  extension "timescaledb" version mismatch: shared library version 2.3.0; SQL version 2.2.0
CONTEXT:  parallel worker

To Reproduce
Steps to reproduce the behavior:

  1. Create a dataset (I created 1 compressed hypertable, ~500M rows, ~10GB on disk)
  2. Change postgresql.conf as such:
parallel_tuple_cost = 0.001
parallel_setup_cost = 1.0
force_parallel_mode = on
  1. Restart the postgresql service
  2. Execute ALTER EXTENSION timescaledb UPDATE TO "2.3.0";
  3. See error

Expected behavior
Expected the upgrade to work.

Additional context
Setting max_parallel_workers = 0 in postgresql.conf fixes the issue.
For some reason, parallel execution of the upgrade process itself seems to trigger this bug.

A possible workaround could maybe be to inject SET max_parallel_workers = 0; in the upgrade scripts. E.g. in this specific case adding it as the first line of the file /usr/pgsql-13/share/extension/timescaledb--2.2.0--2.3.0.sql fixes the issue.

@mfundul mfundul added the bug label May 27, 2021
@mjf
Copy link

mjf commented May 27, 2021

I can verify that patching the /usr/pgsql-13/share/extension/timescaledb--2.2.[01]--2.3.0.sql files works and the extension gets updated.

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

Successfully merging a pull request may close this issue.

2 participants