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

Fix chunk index column name mapping #3082

Merged
merged 2 commits into from Apr 8, 2021

Conversation

svenklemm
Copy link
Member

@svenklemm svenklemm commented Apr 2, 2021

When mapping index columns references from the hypertable index
to the chunk index the name of the index column was used instead
of the column name of the hypertables. While those names are
identical most of time unless modified this is not true for indexes
with INCLUDE on a column that is also a key column.

Fixes #3056

Disable-check: commit-count

@svenklemm svenklemm requested a review from a team as a code owner April 2, 2021 23:30
@svenklemm svenklemm requested review from pmwkaa, nikkhils and k-rus and removed request for a team April 2, 2021 23:30
@svenklemm svenklemm self-assigned this Apr 2, 2021
@codecov
Copy link

codecov bot commented Apr 2, 2021

Codecov Report

Merging #3082 (c5e4a1a) into master (639aef7) will decrease coverage by 0.00%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3082      +/-   ##
==========================================
- Coverage   90.29%   90.28%   -0.01%     
==========================================
  Files         213      213              
  Lines       34893    34895       +2     
==========================================
+ Hits        31505    31506       +1     
- Misses       3388     3389       +1     
Impacted Files Coverage Δ
src/chunk_index.h 100.00% <ø> (ø)
src/chunk_index.c 94.72% <91.66%> (+0.02%) ⬆️
src/process_utility.c 93.85% <100.00%> (ø)
src/loader/bgw_message_queue.c 87.09% <0.00%> (-0.65%) ⬇️

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 639aef7...c5e4a1a. Read the comment docs.

@svenklemm svenklemm force-pushed the index_colname branch 2 times, most recently from 8abb7aa to d52a3fd Compare April 5, 2021 01:08
When mapping index column references from the hypertable index
to the chunk index the name of the index column was used instead
of the column name of the hypertables. While those names are
identical most of time unless modified this is not true for indexes
with INCLUDE on a column that is also a key column. Additionally
this fixes a bug where expression indexes would never get their
column references adjusted.

Fixes timescale#3056
The advisory_lock test of the postgres test suite is flaky so
this patch changes CI to ignore failures in that test.
@svenklemm svenklemm merged commit b6d9cda into timescale:master Apr 8, 2021
k-rus added a commit to k-rus/timescaledb that referenced this pull request Apr 12, 2021
This release adds major new features since the 2.1.1 release.
We deem it moderate priority for upgrading.

This release adds the skip-scan optimization, which significantly
improves performance of queries with DISTINCT ON. This optimization is
not available for queries on distributed hypertables.

For multinode, this release adds a function to create a distributed
restore point, which allows the consistent restore of a multinode
cluster from a backup. The release also includes improvements to
distributed query performance and memory usage.

The bug fixes in this release address issues with size and stats
functions, high memory usage in distributed inserts, slow distributed
ORDER BY queries, indexes involving INCLUDE, and single chunk query
planning.

**Major Features**
* timescale#2843 Add distributed restore point functionality
* timescale#3000 SkipScan to speed up SELECT DISTINCT

**Bugfixes**
* timescale#2989 Refactor and harden size and stats functions
* timescale#3058 Reduce memory usage for distributed inserts
* timescale#3067 Fix extremely slow multi-node order by queries
* timescale#3082 Fix chunk index column name mapping
* timescale#3083 Keep Append pathkeys in ChunkAppend

**Thanks**
* @BowenGG for reporting an issue with indexes with INCLUDE
* @fvannee for reporting an issue with ChunkAppend pathkeys
* @pedrokost and @RobAtticus for reporting an issue with size
  functions on empty hypertables
* @phemmer and @ryanbooz for reporting issues with slow
  multi-node order by queries
* @stephane-moreau for reporting an issue with high memory usage during
  single-transaction inserts on a distributed hypertable.
@k-rus k-rus mentioned this pull request Apr 12, 2021
k-rus added a commit to k-rus/timescaledb that referenced this pull request Apr 12, 2021
This release adds major new features since the 2.1.1 release.
We deem it moderate priority for upgrading.

This release adds the Skip Scan optimization, which significantly
improves the performance of queries with DISTINCT ON. This
optimization is not available for queries on distributed hypertables.

This release also adds a function to create a distributed
restore point, which allows performing a consistent restore of a
multi-node cluster from a backup.

The bug fixes in this release address issues with size and stats
functions, high memory usage in distributed inserts, slow distributed
ORDER BY queries, indexes involving INCLUDE, and single chunk query
planning.

**Major Features**
* timescale#2843 Add distributed restore point functionality
* timescale#3000 SkipScan to speed up SELECT DISTINCT

**Bugfixes**
* timescale#2989 Refactor and harden size and stats functions
* timescale#3058 Reduce memory usage for distributed inserts
* timescale#3067 Fix extremely slow multi-node order by queries
* timescale#3082 Fix chunk index column name mapping
* timescale#3083 Keep Append pathkeys in ChunkAppend

**Thanks**
* @BowenGG for reporting an issue with indexes with INCLUDE
* @fvannee for reporting an issue with ChunkAppend pathkeys
* @pedrokost and @RobAtticus for reporting an issue with size
  functions on empty hypertables
* @phemmer and @ryanbooz for reporting issues with slow
  multi-node order by queries
* @stephane-moreau for reporting an issue with high memory usage during
  single-transaction inserts on a distributed hypertable.
k-rus added a commit to k-rus/timescaledb that referenced this pull request Apr 12, 2021
This release adds major new features since the 2.1.1 release.
We deem it moderate priority for upgrading.

This release adds the Skip Scan optimization, which significantly
improves the performance of queries with DISTINCT ON. This
optimization is not yet available for queries on distributed
hypertables.

This release also adds a function to create a distributed
restore point, which allows performing a consistent restore of a
multi-node cluster from a backup.

The bug fixes in this release address issues with size and stats
functions, high memory usage in distributed inserts, slow distributed
ORDER BY queries, indexes involving INCLUDE, and single chunk query
planning.

**PostgreSQL 11 deprecation announcement**
Timescale is working hard on our next exciting features. To make that
possible, we require functionality that is unfortunately absent on
PostgreSQL 11. For this reason, we will continue supporting PostgreSQL
11 until mid-June 2021. Sooner to that time, we will announce the
specific version of TimescaleDB in which PostgreSQL 11 support will
not be included going forward.

**Major Features**
* timescale#2843 Add distributed restore point functionality
* timescale#3000 SkipScan to speed up SELECT DISTINCT

**Bugfixes**
* timescale#2989 Refactor and harden size and stats functions
* timescale#3058 Reduce memory usage for distributed inserts
* timescale#3067 Fix extremely slow multi-node order by queries
* timescale#3082 Fix chunk index column name mapping
* timescale#3083 Keep Append pathkeys in ChunkAppend

**Thanks**
* @BowenGG for reporting an issue with indexes with INCLUDE
* @fvannee for reporting an issue with ChunkAppend pathkeys
* @pedrokost and @RobAtticus for reporting an issue with size
  functions on empty hypertables
* @phemmer and @ryanbooz for reporting issues with slow
  multi-node order by queries
* @stephane-moreau for reporting an issue with high memory usage during
  single-transaction inserts on a distributed hypertable.
k-rus added a commit to k-rus/timescaledb that referenced this pull request Apr 13, 2021
This release adds major new features since the 2.1.1 release.
We deem it moderate priority for upgrading.

This release adds the Skip Scan optimization, which significantly
improves the performance of queries with DISTINCT ON. This
optimization is not yet available for queries on distributed
hypertables.

This release also adds a function to create a distributed
restore point, which allows performing a consistent restore of a
multi-node cluster from a backup.

The bug fixes in this release address issues with size and stats
functions, high memory usage in distributed inserts, slow distributed
ORDER BY queries, indexes involving INCLUDE, and single chunk query
planning.

**PostgreSQL 11 deprecation announcement**

Timescale is working hard on our next exciting features. To make that
possible, we require functionality that is unfortunately absent on
PostgreSQL 11. For this reason, we will continue supporting PostgreSQL
11 until mid-June 2021. Sooner to that time, we will announce the
specific version of TimescaleDB in which PostgreSQL 11 support will
not be included going forward.

**Major Features**
* timescale#2843 Add distributed restore point functionality
* timescale#3000 SkipScan to speed up SELECT DISTINCT

**Bugfixes**
* timescale#2989 Refactor and harden size and stats functions
* timescale#3058 Reduce memory usage for distributed inserts
* timescale#3067 Fix extremely slow multi-node order by queries
* timescale#3082 Fix chunk index column name mapping
* timescale#3083 Keep Append pathkeys in ChunkAppend

**Thanks**
* @BowenGG for reporting an issue with indexes with INCLUDE
* @fvannee for reporting an issue with ChunkAppend pathkeys
* @pedrokost and @RobAtticus for reporting an issue with size
  functions on empty hypertables
* @phemmer and @ryanbooz for reporting issues with slow
  multi-node order by queries
* @stephane-moreau for reporting an issue with high memory usage during
  single-transaction inserts on a distributed hypertable.
k-rus added a commit that referenced this pull request Apr 13, 2021
This release adds major new features since the 2.1.1 release.
We deem it moderate priority for upgrading.

This release adds the Skip Scan optimization, which significantly
improves the performance of queries with DISTINCT ON. This
optimization is not yet available for queries on distributed
hypertables.

This release also adds a function to create a distributed
restore point, which allows performing a consistent restore of a
multi-node cluster from a backup.

The bug fixes in this release address issues with size and stats
functions, high memory usage in distributed inserts, slow distributed
ORDER BY queries, indexes involving INCLUDE, and single chunk query
planning.

**PostgreSQL 11 deprecation announcement**

Timescale is working hard on our next exciting features. To make that
possible, we require functionality that is unfortunately absent on
PostgreSQL 11. For this reason, we will continue supporting PostgreSQL
11 until mid-June 2021. Sooner to that time, we will announce the
specific version of TimescaleDB in which PostgreSQL 11 support will
not be included going forward.

**Major Features**
* #2843 Add distributed restore point functionality
* #3000 SkipScan to speed up SELECT DISTINCT

**Bugfixes**
* #2989 Refactor and harden size and stats functions
* #3058 Reduce memory usage for distributed inserts
* #3067 Fix extremely slow multi-node order by queries
* #3082 Fix chunk index column name mapping
* #3083 Keep Append pathkeys in ChunkAppend

**Thanks**
* @BowenGG for reporting an issue with indexes with INCLUDE
* @fvannee for reporting an issue with ChunkAppend pathkeys
* @pedrokost and @RobAtticus for reporting an issue with size
  functions on empty hypertables
* @phemmer and @ryanbooz for reporting issues with slow
  multi-node order by queries
* @stephane-moreau for reporting an issue with high memory usage during
  single-transaction inserts on a distributed hypertable.
k-rus added a commit to k-rus/timescaledb that referenced this pull request Apr 13, 2021
This release adds major new features since the 2.1.1 release.
We deem it moderate priority for upgrading.

This release adds the Skip Scan optimization, which significantly
improves the performance of queries with DISTINCT ON. This
optimization is not yet available for queries on distributed
hypertables.

This release also adds a function to create a distributed
restore point, which allows performing a consistent restore of a
multi-node cluster from a backup.

The bug fixes in this release address issues with size and stats
functions, high memory usage in distributed inserts, slow distributed
ORDER BY queries, indexes involving INCLUDE, and single chunk query
planning.

**PostgreSQL 11 deprecation announcement**

Timescale is working hard on our next exciting features. To make that
possible, we require functionality that is unfortunately absent on
PostgreSQL 11. For this reason, we will continue supporting PostgreSQL
11 until mid-June 2021. Sooner to that time, we will announce the
specific version of TimescaleDB in which PostgreSQL 11 support will
not be included going forward.

**Major Features**
* timescale#2843 Add distributed restore point functionality
* timescale#3000 SkipScan to speed up SELECT DISTINCT

**Bugfixes**
* timescale#2989 Refactor and harden size and stats functions
* timescale#3058 Reduce memory usage for distributed inserts
* timescale#3067 Fix extremely slow multi-node order by queries
* timescale#3082 Fix chunk index column name mapping
* timescale#3083 Keep Append pathkeys in ChunkAppend

**Thanks**
* @BowenGG for reporting an issue with indexes with INCLUDE
* @fvannee for reporting an issue with ChunkAppend pathkeys
* @pedrokost and @RobAtticus for reporting an issue with size
  functions on empty hypertables
* @phemmer and @ryanbooz for reporting issues with slow
  multi-node order by queries
* @stephane-moreau for reporting an issue with high memory usage during
  single-transaction inserts on a distributed hypertable.
@k-rus k-rus mentioned this pull request Apr 13, 2021
k-rus added a commit that referenced this pull request Apr 13, 2021
This release adds major new features since the 2.1.1 release.
We deem it moderate priority for upgrading.

This release adds the Skip Scan optimization, which significantly
improves the performance of queries with DISTINCT ON. This
optimization is not yet available for queries on distributed
hypertables.

This release also adds a function to create a distributed
restore point, which allows performing a consistent restore of a
multi-node cluster from a backup.

The bug fixes in this release address issues with size and stats
functions, high memory usage in distributed inserts, slow distributed
ORDER BY queries, indexes involving INCLUDE, and single chunk query
planning.

**PostgreSQL 11 deprecation announcement**

Timescale is working hard on our next exciting features. To make that
possible, we require functionality that is unfortunately absent on
PostgreSQL 11. For this reason, we will continue supporting PostgreSQL
11 until mid-June 2021. Sooner to that time, we will announce the
specific version of TimescaleDB in which PostgreSQL 11 support will
not be included going forward.

**Major Features**
* #2843 Add distributed restore point functionality
* #3000 SkipScan to speed up SELECT DISTINCT

**Bugfixes**
* #2989 Refactor and harden size and stats functions
* #3058 Reduce memory usage for distributed inserts
* #3067 Fix extremely slow multi-node order by queries
* #3082 Fix chunk index column name mapping
* #3083 Keep Append pathkeys in ChunkAppend

**Thanks**
* @BowenGG for reporting an issue with indexes with INCLUDE
* @fvannee for reporting an issue with ChunkAppend pathkeys
* @pedrokost and @RobAtticus for reporting an issue with size
  functions on empty hypertables
* @phemmer and @ryanbooz for reporting issues with slow
  multi-node order by queries
* @stephane-moreau for reporting an issue with high memory usage during
  single-transaction inserts on a distributed hypertable.
@svenklemm svenklemm deleted the index_colname branch April 18, 2021 14:00
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.

ERROR: index attribute xxxxxxx1 not found in chunk
3 participants