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

Copy recreated object permissions on update #3109

Merged
merged 1 commit into from Apr 26, 2021

Conversation

mkindahl
Copy link
Contributor

@mkindahl mkindahl commented Apr 13, 2021

Tables, indexes, and sequences that are recreated as part of an update
does not propagate permissions to the recreated object. This commit
fixes that by saving away the permissions in pg_class temporarily and
then copying them back into the pg_class table.

If internal objects are created or re-created, they get the wrong
initial privileges, which result in privileges not being dumped when
using pg_dump. Save away the privileges before starting the update
and restore them afterwards to make sure that the privileges are
maintained over the update.

For new objects, we use the initial privileges of the chunk metadata
table, which should always have correct initial privileges.

Fixes #3078

@codecov
Copy link

codecov bot commented Apr 13, 2021

Codecov Report

Merging #3109 (f0fdce3) into master (a3d8f9f) will increase coverage by 0.12%.
The diff coverage is n/a.

❗ Current head f0fdce3 differs from pull request most recent head 56fe04f. Consider uploading reports for the commit 56fe04f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3109      +/-   ##
==========================================
+ Coverage   90.22%   90.35%   +0.12%     
==========================================
  Files         215      215              
  Lines       35360    35310      -50     
==========================================
- Hits        31904    31903       -1     
+ Misses       3456     3407      -49     
Impacted Files Coverage Δ
src/loader/bgw_message_queue.c 87.09% <0.00%> (-0.65%) ⬇️
src/import/planner.c 70.30% <0.00%> (+11.12%) ⬆️

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 255b571...56fe04f. Read the comment docs.

@mkindahl mkindahl force-pushed the copy_permissions_on_update branch 4 times, most recently from 74f7fc5 to 01e9a1e Compare April 13, 2021 11:38
@@ -264,6 +258,16 @@ DROP VIEW IF EXISTS timescaledb_information.continuous_aggregates;
DROP VIEW IF EXISTS timescaledb_information.continuous_aggregate_stats;
ALTER TABLE IF EXISTS _timescaledb_catalog.continuous_agg DROP COLUMN IF EXISTS job_id;

-- Save ACL for tables that are being rebuilt
CREATE TABLE saved_acl(tmpoid oid, tmpns oid, tmpacl aclitem[]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be a temporary table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using a temporary table here does not offer any advantage. They are dropped at the end of the session, not at the end of the update, so they need to be explicitly removed anyway.

@mkindahl mkindahl force-pushed the copy_permissions_on_update branch 24 times, most recently from 9f25430 to fb93bbf Compare April 14, 2021 16:17
@mkindahl mkindahl self-assigned this Apr 20, 2021

-- For objects that are newly created, we need to set the initprivs to
-- the initprivs for the "chunk" catalog table since that is created
-- in the first version of TimescaleDB and should have the correct
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you rewrite the comment a bit so that it is clear 1) we choose chunk table (but it could be any other catalog table
2) The comment about first version can be misinterpreted as version 1.0, and I did. Instead reword it as, -- the first time Timescaledb extension was installed --

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the comment

-- We can now update the initprivs for the objects using the saved
-- privileges.
--
-- For objects that existed before, We need to restore initprivs to
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is a bit confusing. Shouldn't initprivs for all the catalog objects be the same as that when the extension was first created? i believe that's what the sql does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried to clarify the comment.

LEFT JOIN saved_privs ON tmpnsp = nspname AND tmpname = relname
WHERE nspname IN ('_timescaledb_catalog', '_timescaledb_config')
OR nspname = '_timescaledb_internal'
AND relname IN ('hypertable_chunk_local_size', 'compressed_chunk_stats')
Copy link
Contributor

Choose a reason for hiding this comment

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

hypertable_chunk_local_size and chunk_stats are views. We should either do this for all the internal views or none.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. These were the ones that showed up in the update tests, but I've added two more tables. However, I don't see any other views.

Ideally, we should place all these objects in some other catalog and leave _timescaledb_internal for only objects that are created as a result of creating other TimescaleDB objects.

JOIN pg_init_privs ip ON ip.objoid = cl.oid
WHERE nspname IN ('_timescaledb_catalog', '_timescaledb_config')
OR nspname = '_timescaledb_internal'
AND relname IN ('hypertable_chunk_local_size', 'compressed_chunk_stats');
Copy link
Contributor

Choose a reason for hiding this comment

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

If we do this for _timescaledb_internal, it should cover all the objects that we create in that schema during extension installation

Copy link
Contributor

Choose a reason for hiding this comment

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

Since we would have to list the objects from _timescaledb_internal here, it would be worth adding a comment in the README that pre/post and need to be updated for any new catalog objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to have a better solution for how to handle and differentiate between objects that are internal to timescaledb objects and objects that we use as part of the implementation. A separate schema would be the easiest solution, but I am reluctant to add this change to this PR and intend to take it separately. For now, I just handle the internal views and tables.

\z _timescaledb_catalog.*
\z _timescaledb_config.*
\z _timescaledb_internal.*
SELECT nspname AS Schema,
Copy link
Contributor

Choose a reason for hiding this comment

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

This should check initprivs as well? Or is that being done some other place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. No, this is probably the best place. Added a check.

@mkindahl mkindahl requested a review from gayyappan April 23, 2021 07:39
@mkindahl mkindahl force-pushed the copy_permissions_on_update branch 2 times, most recently from 7ab457d to f753018 Compare April 23, 2021 08:22
@mkindahl mkindahl requested a review from svenklemm April 23, 2021 16:13
Tables, indexes, and sequences that are recreated as part of an update
does not propagate permissions to the recreated object. This commit
fixes that by saving away the permissions in `pg_class` temporarily and
then copying them back into the `pg_class` table.

If internal objects are created or re-created, they get the wrong
initial privileges, which result in privileges not being dumped when
using `pg_dump`. Save away the privileges before starting the update
and restore them afterwards to make sure that the privileges are
maintained over the update.

For new objects, we use the initial privileges of the `chunk` metadata
table, which should always have correct initial privileges.

Fixes timescale#3078
@mkindahl mkindahl merged commit aeb1076 into timescale:master Apr 26, 2021
@mkindahl mkindahl deleted the copy_permissions_on_update branch April 26, 2021 06:37
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 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 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.

User missing after update from 1.7.5 to 2.0.x or later
5 participants