-
Notifications
You must be signed in to change notification settings - Fork 885
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
2.0.2 cherry pick #2960
Merged
Merged
2.0.2 cherry pick #2960
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
be45e6e
Add 2.0.1 to update test scripts
svenklemm 487bf8d
Fix compressed chunk check when disabling compression
svenklemm 53c30b6
Set status for backend in background jobs
mkindahl 2062c6b
Add GUC to control join qual propagation
svenklemm d6672f8
Fix changing column type of clustered hypertables
svenklemm d664717
Fix typo in CI config
svenklemm 29c4a64
Fix join propagation for nested joins
svenklemm 97051e5
Change bootstrap and CMake defaults
mkindahl 20af146
Explicitly check for "-Wno-stringop-truncation" compiler flag
nikkhils 229c630
Release 1.7.5
k-rus a3427ed
Bump postgres versions used in CI
svenklemm e2f58dd
Fix detection of stringop truncation compiler support
svenklemm fd02e17
Disable strict-overflow check for gcc < 8
svenklemm ade8903
Fix sanitizer test
svenklemm f7d937a
Add 1.7.5 to update test scripts
pmwkaa 13fb8a2
Fail continuous aggregate refresh smaller than one bucket
erimatnor be5d9d8
Validate continuous aggregate policy
erimatnor d96fb35
Optimize cagg refresh for single row inserts
erimatnor 94b0ca4
Limit number of materializations per cagg refresh
erimatnor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
-- Recreate missing dimension slices that might be missing. If the | ||
-- dimension slice table is broken and there are dimension slices | ||
-- missing from the table, we will repair it by: | ||
-- | ||
-- 1. Finding all chunk constraints that have missing dimension | ||
-- slices and extract the constraint expression from the | ||
-- associated constraint. | ||
-- | ||
-- 2. Parse the constraint expression and extract the column name, | ||
-- and upper and lower range values as text or, if it is a | ||
-- partition constraint, pick the existing constraint (either | ||
-- uppper or lower end of range) and make the other end open. | ||
-- | ||
-- 3. Use the column type to construct the range values (UNIX | ||
-- microseconds) from these strings. | ||
INSERT INTO _timescaledb_catalog.dimension_slice | ||
WITH | ||
-- All dimension slices that are mentioned in the chunk_constraint | ||
-- table but are missing from the dimension_slice table. | ||
missing_slices AS ( | ||
SELECT hypertable_id, | ||
chunk_id, | ||
dimension_slice_id, | ||
constraint_name, | ||
attname AS column_name, | ||
pg_get_expr(conbin, conrelid) AS constraint_expr | ||
FROM _timescaledb_catalog.chunk_constraint cc | ||
JOIN _timescaledb_catalog.chunk ch ON cc.chunk_id = ch.id | ||
JOIN pg_constraint ON conname = constraint_name | ||
JOIN pg_namespace ns ON connamespace = ns.oid AND ns.nspname = ch.schema_name | ||
JOIN pg_attribute ON attnum = conkey[1] AND attrelid = conrelid | ||
WHERE | ||
dimension_slice_id NOT IN (SELECT id FROM _timescaledb_catalog.dimension_slice) | ||
), | ||
|
||
-- Unparsed range start and end for each dimension slice id that | ||
-- is missing. | ||
unparsed_missing_slices AS ( | ||
SELECT di.id AS dimension_id, | ||
dimension_slice_id, | ||
constraint_name, | ||
column_type, | ||
column_name, | ||
(SELECT SUBSTRING(constraint_expr, $$>=\s*'?([\w\d\s:+-]+)'?$$)) AS range_start, | ||
(SELECT SUBSTRING(constraint_expr, $$<\s*'?([\w\d\s:+-]+)'?$$)) AS range_end | ||
FROM missing_slices JOIN _timescaledb_catalog.dimension di USING (hypertable_id, column_name) | ||
) | ||
SELECT DISTINCT | ||
dimension_slice_id, | ||
dimension_id, | ||
CASE | ||
WHEN column_type = 'timestamptz'::regtype THEN | ||
EXTRACT(EPOCH FROM range_start::timestamptz)::bigint * 1000000 | ||
WHEN column_type = 'timestamp'::regtype THEN | ||
EXTRACT(EPOCH FROM range_start::timestamp)::bigint * 1000000 | ||
WHEN column_type = 'date'::regtype THEN | ||
EXTRACT(EPOCH FROM range_start::date)::bigint * 1000000 | ||
ELSE | ||
CASE | ||
WHEN range_start IS NULL | ||
THEN (-9223372036854775808)::bigint | ||
ELSE range_start::bigint | ||
END | ||
END AS range_start, | ||
CASE | ||
WHEN column_type = 'timestamptz'::regtype THEN | ||
EXTRACT(EPOCH FROM range_end::timestamptz)::bigint * 1000000 | ||
WHEN column_type = 'timestamp'::regtype THEN | ||
EXTRACT(EPOCH FROM range_end::timestamp)::bigint * 1000000 | ||
WHEN column_type = 'date'::regtype THEN | ||
EXTRACT(EPOCH FROM range_end::date)::bigint * 1000000 | ||
ELSE | ||
CASE WHEN range_end IS NULL | ||
THEN 9223372036854775807::bigint | ||
ELSE range_end::bigint | ||
END | ||
END AS range_end | ||
FROM unparsed_missing_slices; | ||
|
||
-- set compressed_chunk_id to NULL for dropped chunks | ||
UPDATE _timescaledb_catalog.chunk SET compressed_chunk_id = NULL WHERE dropped = true AND compressed_chunk_id IS NOT NULL; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
-- set compressed_chunk_id to NULL for dropped chunks | ||
UPDATE _timescaledb_catalog.chunk SET compressed_chunk_id = NULL WHERE dropped = true AND compressed_chunk_id IS NOT NULL; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Shouldn't you list all issues that are cherry-picked? I'm missing issue #2831 and issue #2770 (or PR #2893)