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 crash while using REINDEX TABLE CONCURRENTLY #3123

Merged
merged 1 commit into from Apr 19, 2021

Conversation

pmwkaa
Copy link
Contributor

@pmwkaa pmwkaa commented Apr 15, 2021

Fix crash while using REINDEX TABLE CONCURRENTLY

CONCURRENTLY option of the REINDEX TABLE is not supported and
leads to a crash when using with hypertable. Block it and print
the error message.

Fix #3122

@pmwkaa pmwkaa requested a review from a team as a code owner April 15, 2021 13:30
@pmwkaa pmwkaa requested review from k-rus, mfundul, gayyappan and a team and removed request for a team April 15, 2021 13:30
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #3123 (cd41ea1) into master (d26c744) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3123      +/-   ##
==========================================
- Coverage   90.33%   90.31%   -0.03%     
==========================================
  Files         215      215              
  Lines       35254    35256       +2     
==========================================
- Hits        31848    31840       -8     
- Misses       3406     3416      +10     
Impacted Files Coverage Δ
src/process_utility.c 93.85% <100.00%> (+<0.01%) ⬆️
src/loader/bgw_launcher.c 89.50% <0.00%> (-2.47%) ⬇️
tsl/src/reorder.c 81.84% <0.00%> (-0.27%) ⬇️
tsl/src/nodes/data_node_dispatch.c 97.07% <0.00%> (-0.25%) ⬇️

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 d26c744...cd41ea1. Read the comment docs.

@pmwkaa
Copy link
Contributor Author

pmwkaa commented Apr 15, 2021

Index test on PG11 is failing, working on a template test file

{
stmt->concurrent = false;
ereport(NOTICE,
(errmsg("REINDEX TABLE CONCURRENTLY is unsupported on a hypertable"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is unclear why this isn't an error. People can just drop CONCURRENTLY if they want to reindex.

I also suggest formulating similar to this PostgreSQL error: ""concurrent index creation on system catalog tables is not supported":

Suggested change
(errmsg("REINDEX TABLE CONCURRENTLY is unsupported on a hypertable"),
(errmsg("concurrent index creation on hypertables is not supported"),

Copy link
Contributor Author

@pmwkaa pmwkaa Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine to throw an error here, I've seen that PostgreSQL actually also switches to regular implementation in some cases and shows a NOTICE in such cases. I guess we should decide for yourselves

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point to the place in the PostgreSQL code where they do this?

It seems odd to me, because if PostgreSQL has implemented CONCURRENTLY I don't understand why they wouldn't use it, unless they do to this bait-and-switch depending on object type.

Copy link
Contributor Author

@pmwkaa pmwkaa Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I misunderstood when checked the code for first time, I had a different impression. Switched to produce the error as suggest.

stmt->concurrent = false;
ereport(NOTICE,
(errmsg("REINDEX TABLE CONCURRENTLY is unsupported on a hypertable"),
errdetail("Using non-concurrent implementation.")));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, not sure we need this since we should probably just generate an error above.

Suggested change
errdetail("Using non-concurrent implementation.")));
errdetail("Performing non-concurrent reindexing instead.")));

Copy link
Contributor

@gayyappan gayyappan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question about test MakeList.

test/sql/CMakeLists.txt Show resolved Hide resolved
@svenklemm
Copy link
Member

Needs changelog entry.

CONCURRENTLY option of the REINDEX TABLE is not supported and
leads to a crash when using with hypertable. Block it and print
the error message.

Fix timescale#3122
@pmwkaa pmwkaa merged commit 20fd421 into timescale:master Apr 19, 2021
k-rus added a commit to k-rus/timescaledb that referenced this pull request Apr 21, 2021
index text was moved into SQL test template in timescale#3123 and
generated_columns - in timescale#2927.
k-rus added a commit to k-rus/timescaledb that referenced this pull request Apr 21, 2021
`index` test was moved into SQL test template in timescale#3123 and
`generated_columns` - in timescale#2927. They are added to relevant gitignore.
k-rus added a commit that referenced this pull request Apr 21, 2021
`index` test was moved into SQL test template in #3123 and
`generated_columns` - in #2927. They are added to relevant gitignore.
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request Apr 28, 2021
This maintenance release contains bugfixes since the 2.1.0 release. We
deem it high priority for upgrading.

This release adds support for Skip Scan on multinode by enabling the
pushdown of `DISTINCT` to data nodes and also fixes a number of bugs
in the implementation of Skip Scan.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on DELETE
* timescale#3155 Inherit CFLAGS from PostgreSQL
* timescale#3109 Copy recreated object permissions on update
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3102 Fix REINDEX TABLE for distributed hypertables
* timescale#3118 Fix use after free in cache
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
@mkindahl mkindahl mentioned this pull request Apr 28, 2021
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request Apr 28, 2021
This maintenance release contains bugfixes since the 2.1.0 release. We
deem it high priority for upgrading.

This release adds support for Skip Scan on multinode by enabling the
pushdown of `DISTINCT` to data nodes and also fixes a number of bugs
in the implementation of Skip Scan.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on DELETE
* timescale#3155 Inherit CFLAGS from PostgreSQL
* timescale#3109 Copy recreated object permissions on update
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3102 Fix REINDEX TABLE for distributed hypertables
* timescale#3118 Fix use after free in cache
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request Apr 29, 2021
This maintenance release contains bugfixes since the 2.1.0 release. We
deem it high priority for upgrading.

This release adds support for Skip Scan on multinode by enabling the
pushdown of `DISTINCT` to data nodes and also fixes a number of bugs
in the implementation of Skip Scan.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on DELETE
* timescale#3155 Inherit CFLAGS from PostgreSQL
* timescale#3109 Copy recreated object permissions on update
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3102 Fix REINDEX TABLE for distributed hypertables
* timescale#3118 Fix use after free in cache
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
mkindahl pushed a commit that referenced this pull request Apr 29, 2021
`index` test was moved into SQL test template in #3123 and
`generated_columns` - in #2927. They are added to relevant gitignore.
mkindahl pushed a commit to mkindahl/timescaledb that referenced this pull request Apr 29, 2021
`index` test was moved into SQL test template in timescale#3123 and
`generated_columns` - in timescale#2927. They are added to relevant gitignore.
mkindahl pushed a commit to mkindahl/timescaledb that referenced this pull request Apr 29, 2021
`index` test was moved into SQL test template in timescale#3123 and
`generated_columns` - in timescale#2927. They are added to relevant gitignore.
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request Apr 29, 2021
This maintenance release contains bugfixes since the 2.1.0 release. We
deem it high priority for upgrading.

This release adds support for Skip Scan on multinode by enabling the
pushdown of `DISTINCT` to data nodes and also fixes a number of bugs
in the implementation of Skip Scan.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on DELETE
* timescale#3155 Inherit CFLAGS from PostgreSQL
* timescale#3109 Copy recreated object permissions on update
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3102 Fix REINDEX TABLE for distributed hypertables
* timescale#3118 Fix use after free in cache
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request Apr 30, 2021
This maintenance release contains bugfixes since the 2.1.0 release. We
deem it high priority for upgrading.

This release adds support for Skip Scan on multinode by enabling the
pushdown of `DISTINCT` to data nodes and also fixes a number of bugs
in the implementation of Skip Scan.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on DELETE
* timescale#3155 Inherit CFLAGS from PostgreSQL
* timescale#3109 Copy recreated object permissions on update
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3102 Fix REINDEX TABLE for distributed hypertables
* timescale#3118 Fix use after free in cache
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request May 3, 2021
This maintenance release contains bugfixes since the 2.1.0 release. We
deem it high priority for upgrading.

This release extends Skip Scan to multinode by enabling the pushdown
of `DISTINCT` to data nodes. It also fixes a number of bugs in the
implementation of Skip Scan.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip
  Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3102 Fix `REINDEX TABLE` for distributed hypertables
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3109 Copy recreated object permissions on update
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3118 Fix use after free in cache
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on `DELETE`
* timescale#3155 Inherit `CFLAGS` from PostgreSQL
* timescale#3169 Fix incorrect type cast in compression policy

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with
  multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
* @nathanloisel for reporting an issue with compression on hypertables
  with integer-based timestamps
* @xin-hedera for fixing an issue with compression on hypertables with
  integer-based timestamps
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request May 3, 2021
This maintenance release contains bugfixes since the 2.1.0 release. We
deem it high priority for upgrading.

This release extends Skip Scan to multinode by enabling the pushdown
of `DISTINCT` to data nodes. It also fixes a number of bugs in the
implementation of Skip Scan.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip
  Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3102 Fix `REINDEX TABLE` for distributed hypertables
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3109 Copy recreated object permissions on update
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3118 Fix use after free in cache
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on `DELETE`
* timescale#3155 Inherit `CFLAGS` from PostgreSQL
* timescale#3169 Fix incorrect type cast in compression policy

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with
  multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
* @nathanloisel for reporting an issue with compression on hypertables
  with integer-based timestamps
* @xin-hedera for fixing an issue with compression on hypertables with
  integer-based timestamps
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request May 4, 2021
This maintenance release contains bugfixes since the 2.1.0 release. We
deem it high priority for upgrading.

This release extends Skip Scan to multinode by enabling the pushdown
of `DISTINCT` to data nodes. It also fixes a number of bugs in the
implementation of Skip Scan, in distributed hypertables, in creation
of indexes, in compression, and in policies.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip
  Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3102 Fix `REINDEX TABLE` for distributed hypertables
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3109 Copy recreated object permissions on update
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3118 Fix use after free in cache
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries with
  expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on `DELETE`
* timescale#3155 Inherit `CFLAGS` from PostgreSQL
* timescale#3169 Fix incorrect type cast in compression policy

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with
  multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
* @nathanloisel for reporting an issue with compression on hypertables
  with integer-based timestamps
* @xin-hedera for fixing an issue with compression on hypertables with
  integer-based timestamps
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request May 4, 2021
This maintenance release contains bugfixes since the 2.2.0 release. We
deem it high priority for upgrading.

This release extends Skip Scan to multinode by enabling the pushdown
of `DISTINCT` to data nodes. It also fixes a number of bugs in the
implementation of Skip Scan, in distributed hypertables, in creation
of indexes, in compression, and in policies.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip
  Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3102 Fix `REINDEX TABLE` for distributed hypertables
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3109 Copy recreated object permissions on update
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3118 Fix use after free in cache
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries
  with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on `DELETE`
* timescale#3155 Inherit `CFLAGS` from PostgreSQL
* timescale#3169 Fix incorrect type cast in compression policy
* timescale#3183 Fix segfault in calculate_chunk_interval
* timescale#3185 Fix wrong datatype in integer based retention policy

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with
  multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
* @nathanloisel for reporting an issue with compression on hypertables
  with integer-based timestamps
* @xin-hedera for fixing an issue with compression on hypertables with
  integer-based timestamps
mkindahl added a commit that referenced this pull request May 5, 2021
This maintenance release contains bugfixes since the 2.2.0 release. We
deem it high priority for upgrading.

This release extends Skip Scan to multinode by enabling the pushdown
of `DISTINCT` to data nodes. It also fixes a number of bugs in the
implementation of Skip Scan, in distributed hypertables, in creation
of indexes, in compression, and in policies.

**Features**
* #3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip
  Scan

**Bugfixes**
* #3101 Use commit date in `get_git_commit()`
* #3102 Fix `REINDEX TABLE` for distributed hypertables
* #3104 Fix use after free in `add_reorder_policy`
* #3106 Fix use after free in `chunk_api_get_chunk_stats`
* #3109 Copy recreated object permissions on update
* #3111 Fix `CMAKE_BUILD_TYPE` check
* #3112 Use `%u` to format Oid instead of `%d`
* #3118 Fix use after free in cache
* #3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* #3135 Fix SkipScan path generation in `DISTINCT` queries
  with expressions
* #3146 Fix SkipScan for IndexPaths without pathkeys
* #3147 Skip ChunkAppend if AppendPath has no children
* #3148 Make `SELECT DISTINCT` handle non-var targetlists
* #3151 Fix `fdw_relinfo_get` assertion failure on `DELETE`
* #3155 Inherit `CFLAGS` from PostgreSQL
* #3169 Fix incorrect type cast in compression policy
* #3183 Fix segfault in calculate_chunk_interval
* #3185 Fix wrong datatype in integer based retention policy

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with
  multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
* @nathanloisel for reporting an issue with compression on hypertables
  with integer-based timestamps
* @xin-hedera for fixing an issue with compression on hypertables with
  integer-based timestamps
mkindahl added a commit to mkindahl/timescaledb that referenced this pull request May 5, 2021
This maintenance release contains bugfixes since the 2.2.0 release. We
deem it high priority for upgrading.

This release extends Skip Scan to multinode by enabling the pushdown
of `DISTINCT` to data nodes. It also fixes a number of bugs in the
implementation of Skip Scan, in distributed hypertables, in creation
of indexes, in compression, and in policies.

**Features**
* timescale#3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip
  Scan

**Bugfixes**
* timescale#3101 Use commit date in `get_git_commit()`
* timescale#3102 Fix `REINDEX TABLE` for distributed hypertables
* timescale#3104 Fix use after free in `add_reorder_policy`
* timescale#3106 Fix use after free in `chunk_api_get_chunk_stats`
* timescale#3109 Copy recreated object permissions on update
* timescale#3111 Fix `CMAKE_BUILD_TYPE` check
* timescale#3112 Use `%u` to format Oid instead of `%d`
* timescale#3118 Fix use after free in cache
* timescale#3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* timescale#3135 Fix SkipScan path generation in `DISTINCT` queries
  with expressions
* timescale#3146 Fix SkipScan for IndexPaths without pathkeys
* timescale#3147 Skip ChunkAppend if AppendPath has no children
* timescale#3148 Make `SELECT DISTINCT` handle non-var targetlists
* timescale#3151 Fix `fdw_relinfo_get` assertion failure on `DELETE`
* timescale#3155 Inherit `CFLAGS` from PostgreSQL
* timescale#3169 Fix incorrect type cast in compression policy
* timescale#3183 Fix segfault in calculate_chunk_interval
* timescale#3185 Fix wrong datatype in integer based retention policy

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with
  multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
* @nathanloisel for reporting an issue with compression on hypertables
  with integer-based timestamps
* @xin-hedera for fixing an issue with compression on hypertables with
  integer-based timestamps
mkindahl pushed a commit that referenced this pull request May 5, 2021
`index` test was moved into SQL test template in #3123 and
`generated_columns` - in #2927. They are added to relevant gitignore.
mkindahl added a commit that referenced this pull request May 5, 2021
This maintenance release contains bugfixes since the 2.2.0 release. We
deem it high priority for upgrading.

This release extends Skip Scan to multinode by enabling the pushdown
of `DISTINCT` to data nodes. It also fixes a number of bugs in the
implementation of Skip Scan, in distributed hypertables, in creation
of indexes, in compression, and in policies.

**Features**
* #3113 Pushdown "SELECT DISTINCT" in multi-node to allow use of Skip
  Scan

**Bugfixes**
* #3101 Use commit date in `get_git_commit()`
* #3102 Fix `REINDEX TABLE` for distributed hypertables
* #3104 Fix use after free in `add_reorder_policy`
* #3106 Fix use after free in `chunk_api_get_chunk_stats`
* #3109 Copy recreated object permissions on update
* #3111 Fix `CMAKE_BUILD_TYPE` check
* #3112 Use `%u` to format Oid instead of `%d`
* #3118 Fix use after free in cache
* #3123 Fix crash while using `REINDEX TABLE CONCURRENTLY`
* #3135 Fix SkipScan path generation in `DISTINCT` queries
  with expressions
* #3146 Fix SkipScan for IndexPaths without pathkeys
* #3147 Skip ChunkAppend if AppendPath has no children
* #3148 Make `SELECT DISTINCT` handle non-var targetlists
* #3151 Fix `fdw_relinfo_get` assertion failure on `DELETE`
* #3155 Inherit `CFLAGS` from PostgreSQL
* #3169 Fix incorrect type cast in compression policy
* #3183 Fix segfault in calculate_chunk_interval
* #3185 Fix wrong datatype in integer based retention policy

**Thanks**
* @Dead2, @dv8472 and @einsibjarni for reporting an issue with
  multinode queries and views
* @hperez75 for reporting an issue with Skip Scan
* @nathanloisel for reporting an issue with compression on hypertables
  with integer-based timestamps
* @xin-hedera for fixing an issue with compression on hypertables with
  integer-based timestamps
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.

REINDEX CONCURRENTLY leads to crash
4 participants