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

Allow ALTER TABLE DROP COLUMN on compressed hypertable #3769

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

svenklemm
Copy link
Member

This patch allows dropping columns from hypertables with compression
enabled when the dropped column is neither an orderby nor a
segmentby column.

Fixes #3683

@svenklemm svenklemm requested a review from a team as a code owner November 1, 2021 07:30
@svenklemm svenklemm requested review from berkley, afiskon and akuzm and removed request for a team November 1, 2021 07:30
@svenklemm svenklemm self-assigned this Nov 1, 2021
@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #3769 (600612b) into master (77d1267) will increase coverage by 0.10%.
The diff coverage is 98.80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3769      +/-   ##
==========================================
+ Coverage   90.36%   90.46%   +0.10%     
==========================================
  Files         213      213              
  Lines       37719    37753      +34     
==========================================
+ Hits        34084    34154      +70     
+ Misses       3635     3599      -36     
Impacted Files Coverage Δ
src/process_utility.c 94.37% <ø> (ø)
src/hypertable_compression.c 96.35% <96.66%> (+0.08%) ⬆️
src/continuous_agg.c 96.65% <100.00%> (+6.22%) ⬆️
tsl/src/compression/create.c 96.27% <100.00%> (+0.17%) ⬆️
tsl/src/continuous_aggs/invalidation.c 96.00% <100.00%> (ø)
tsl/src/continuous_aggs/refresh.c 96.63% <100.00%> (ø)
tsl/src/dist_backup.c 94.64% <100.00%> (ø)
tsl/src/process_utility.c 91.37% <100.00%> (+1.79%) ⬆️
tsl/src/remote/dist_txn.c 93.40% <100.00%> (+0.18%) ⬆️
tsl/src/remote/txn.c 88.53% <100.00%> (+0.61%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5eadbbd...600612b. Read the comment docs.

src/hypertable_compression.c Outdated Show resolved Hide resolved
src/hypertable_compression.c Outdated Show resolved Hide resolved
tsl/src/compression/create.c Show resolved Hide resolved
tsl/src/compression/create.c Show resolved Hide resolved
tsl/src/compression/create.c Show resolved Hide resolved
tsl/src/compression/create.c Outdated Show resolved Hide resolved
tsl/src/compression/create.c Outdated Show resolved Hide resolved
tsl/test/sql/include/compression_alter.sql Show resolved Hide resolved
@svenklemm svenklemm force-pushed the drop_compressed_column branch 3 times, most recently from fbf5f2a to 364ac9a Compare November 3, 2021 15:57
@svenklemm svenklemm force-pushed the drop_compressed_column branch 3 times, most recently from 45e0e4a to 9df29a1 Compare November 4, 2021 12:19
@svenklemm svenklemm force-pushed the drop_compressed_column branch 2 times, most recently from 2f90b65 to ada7269 Compare November 4, 2021 15:38
@svenklemm svenklemm changed the title Allow dropping columns from hypertable with compression Allow ALTER TABLE DROP COLUMN on compressed hypertable Nov 4, 2021
This patch allows dropping columns from hypertables with compression
enabled when the dropped column is neither an orderby nor a
segmentby column.

Fixes timescale#3683
@svenklemm svenklemm merged commit 151637d into timescale:master Nov 4, 2021
akuzm added a commit to akuzm/timescaledb that referenced this pull request Feb 17, 2022
This release is medium priority for upgrade. We recommend that you
upgrade at the next available opportunity.

This release adds major new features since the 2.5.2 release,
including:

Compression in continuous aggregates Experimental support for timezones
in continuous aggregates Experimental support for monthly buckets in
continuous aggregates It also includes several bug fixes. Telemetry
reports are switched to a new format, and now include more detailed
statistics on compression, distributed hypertables and indexes.

**Features**

* timescale#3768 Allow ALTER TABLE ADD COLUMN with DEFAULT on compressed
hypertable
* timescale#3769 Allow ALTER TABLE DROP COLUMN on compressed hypertable
* timescale#3943 Optimize first/last
* timescale#3945 Add support for ALTER SCHEMA on multi-node
* timescale#3949 Add support for DROP SCHEMA on multi-node

**Bugfixes**

* timescale#3808 Properly handle max_retries option
* timescale#3863 Fix remote transaction heal logic
* timescale#3869 Fix ALTER SET/DROP NULL contstraint on distributed hypertable
* timescale#3944 Fix segfault in add_compression_policy
* timescale#3961 Fix crash in EXPLAIN VERBOSE on distributed hypertable
* timescale#4015 Eliminate float rounding instabilities in interpolate
* timescale#4019 Update ts_extension_oid in transitioning state
* timescale#4073 Fix buffer overflow in partition scheme

**Improvements**

Query planning performance is improved for hypertables with a large
number of chunks.

**Thanks**

* @fvannee for reporting a first/last memory leak
* @mmouterde for reporting an issue with floats and interpolate
akuzm added a commit that referenced this pull request Feb 17, 2022
This release is medium priority for upgrade. We recommend that you
upgrade at the next available opportunity.

This release adds major new features since the 2.5.2 release,
including:

Compression in continuous aggregates Experimental support for timezones
in continuous aggregates Experimental support for monthly buckets in
continuous aggregates It also includes several bug fixes. Telemetry
reports are switched to a new format, and now include more detailed
statistics on compression, distributed hypertables and indexes.

**Features**

* #3768 Allow ALTER TABLE ADD COLUMN with DEFAULT on compressed
hypertable
* #3769 Allow ALTER TABLE DROP COLUMN on compressed hypertable
* #3943 Optimize first/last
* #3945 Add support for ALTER SCHEMA on multi-node
* #3949 Add support for DROP SCHEMA on multi-node

**Bugfixes**

* #3808 Properly handle max_retries option
* #3863 Fix remote transaction heal logic
* #3869 Fix ALTER SET/DROP NULL contstraint on distributed hypertable
* #3944 Fix segfault in add_compression_policy
* #3961 Fix crash in EXPLAIN VERBOSE on distributed hypertable
* #4015 Eliminate float rounding instabilities in interpolate
* #4019 Update ts_extension_oid in transitioning state
* #4073 Fix buffer overflow in partition scheme

**Improvements**

Query planning performance is improved for hypertables with a large
number of chunks.

**Thanks**

* @fvannee for reporting a first/last memory leak
* @mmouterde for reporting an issue with floats and interpolate
svenklemm pushed a commit that referenced this pull request Feb 17, 2022
This release is medium priority for upgrade. We recommend that you
upgrade at the next available opportunity.

This release adds major new features since the 2.5.2 release,
including:

Compression in continuous aggregates Experimental support for timezones
in continuous aggregates Experimental support for monthly buckets in
continuous aggregates It also includes several bug fixes. Telemetry
reports are switched to a new format, and now include more detailed
statistics on compression, distributed hypertables and indexes.

**Features**

* #3768 Allow ALTER TABLE ADD COLUMN with DEFAULT on compressed
hypertable
* #3769 Allow ALTER TABLE DROP COLUMN on compressed hypertable
* #3943 Optimize first/last
* #3945 Add support for ALTER SCHEMA on multi-node
* #3949 Add support for DROP SCHEMA on multi-node

**Bugfixes**

* #3808 Properly handle max_retries option
* #3863 Fix remote transaction heal logic
* #3869 Fix ALTER SET/DROP NULL contstraint on distributed hypertable
* #3944 Fix segfault in add_compression_policy
* #3961 Fix crash in EXPLAIN VERBOSE on distributed hypertable
* #4015 Eliminate float rounding instabilities in interpolate
* #4019 Update ts_extension_oid in transitioning state
* #4073 Fix buffer overflow in partition scheme

**Improvements**

Query planning performance is improved for hypertables with a large
number of chunks.

**Thanks**

* @fvannee for reporting a first/last memory leak
* @mmouterde for reporting an issue with floats and interpolate
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.

[Feature request] Dropping a column from a compressed hypertable
5 participants