Remove finalized parameter from schema dump and CREATE statement#128
Merged
josesahad merged 2 commits intotimescale:masterfrom Feb 9, 2026
Conversation
The `timescaledb.finalized` parameter was removed in TimescaleDB 2.14+ where all continuous aggregates are finalized by default. Including this parameter causes an error on newer versions: PG::InvalidParameterValue: ERROR: unrecognized parameter "timescaledb.finalized" This change: - Only outputs `finalized: false` in schema dumps (for legacy compatibility) - Only includes `timescaledb.finalized=false` in CREATE statements - Omits the parameter when true (the default) to support TimescaleDB 2.14+ This maintains backward compatibility with TimescaleDB 2.7-2.13 for users who still have legacy (non-finalized) continuous aggregates. Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
For those who come here looking for a solution, I reported the problem to support and they are taking care of this |
josesahad
reviewed
Feb 5, 2026
| @@ -178,15 +177,30 @@ | |||
| end | |||
|
|
|||
| context 'when overriding WITH clause timescaledb.finalized' do | |||
Contributor
There was a problem hiding this comment.
This is failing when running the tests, not sure if we should keep it.
Contributor
|
Hi @stevehill1981, thank you very much for the PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
timescaledb.finalizedparameter was removed in TimescaleDB 2.14+ where all continuous aggregates are finalized by default. When using this gem with TimescaleDB 2.14+, loading a schema that includesfinalized: truecauses an error:This affects both:
finalized: truefinalized: truetocreate_continuous_aggregateSolution
finalized: falsein schema dumps (for legacy compatibility with 2.7-2.13)timescaledb.finalized=falsein CREATE statementstrue(the default) to support TimescaleDB 2.14+This maintains backward compatibility with TimescaleDB 2.7-2.13 for users who still have legacy (non-finalized) continuous aggregates, while fixing the error on 2.14+.
Changes
lib/timescaledb/schema_dumper.rb- Only outputfinalized: falsewhen explicitly falselib/timescaledb/migration_helpers.rb- Only include finalized clause when explicitly falseReferences