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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Index test on PG11 is failing, working on a template test file |
src/process_utility.c
Outdated
{ | ||
stmt->concurrent = false; | ||
ereport(NOTICE, | ||
(errmsg("REINDEX TABLE CONCURRENTLY is unsupported on a hypertable"), |
There was a problem hiding this comment.
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":
(errmsg("REINDEX TABLE CONCURRENTLY is unsupported on a hypertable"), | |
(errmsg("concurrent index creation on hypertables is not supported"), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/process_utility.c
Outdated
stmt->concurrent = false; | ||
ereport(NOTICE, | ||
(errmsg("REINDEX TABLE CONCURRENTLY is unsupported on a hypertable"), | ||
errdetail("Using non-concurrent implementation."))); |
There was a problem hiding this comment.
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.
errdetail("Using non-concurrent implementation."))); | |
errdetail("Performing non-concurrent reindexing instead."))); |
bea230f
to
cd41ea1
Compare
There was a problem hiding this 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.
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
index text was moved into SQL test template in timescale#3123 and generated_columns - in timescale#2927.
`index` test was moved into SQL test template in timescale#3123 and `generated_columns` - in timescale#2927. They are added to relevant gitignore.
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
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
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
`index` test was moved into SQL test template in timescale#3123 and `generated_columns` - in timescale#2927. They are added to relevant gitignore.
`index` test was moved into SQL test template in timescale#3123 and `generated_columns` - in timescale#2927. They are added to relevant gitignore.
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
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
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
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
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
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
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
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
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
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