-
Notifications
You must be signed in to change notification settings - Fork 896
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional
force
argument to refresh_continuous_aggregate
Continuous aggregates that are built on top of tiered hypertables cannot access and materialize tiered data when `timescaledb.enable_tiered_reads` GUC is disabled at the server level. And there is no way for a user to manually force the refresh with tiered reads enabled. Here we add an optional `force` parameter to the `refresh_continuous_aggregate` procedure that would allow user to partially re-materialize cagg within a time window that has been previously materialized.
- Loading branch information
Showing
12 changed files
with
172 additions
and
66 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Implements: #7521 Add optional `force` argument to `refresh_continuous_aggregate` |
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 |
---|---|---|
|
@@ -212,6 +212,7 @@ AS '@MODULE_PATHNAME@', 'ts_tablespace_show' LANGUAGE C VOLATILE STRICT; | |
CREATE OR REPLACE PROCEDURE @[email protected]_continuous_aggregate( | ||
continuous_aggregate REGCLASS, | ||
window_start "any", | ||
window_end "any" | ||
window_end "any", | ||
force BOOLEAN = FALSE | ||
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_continuous_agg_refresh'; | ||
|
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 |
---|---|---|
|
@@ -114,3 +114,14 @@ CREATE FUNCTION @[email protected]_columnstore_stats (hypertable REGCLASS) | |
STABLE STRICT | ||
AS 'SELECT * FROM @[email protected]_compression_stats($1)' | ||
SET search_path TO pg_catalog, pg_temp; | ||
|
||
-- Recreate `refresh_continuous_aggregate` procedure to add `force` argument | ||
DROP PROCEDURE IF EXISTS @[email protected]_continuous_aggregate (continuous_aggregate REGCLASS, window_start "any", window_end "any"); | ||
|
||
CREATE PROCEDURE @[email protected]_continuous_aggregate( | ||
continuous_aggregate REGCLASS, | ||
window_start "any", | ||
window_end "any", | ||
force BOOLEAN = FALSE | ||
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_update_placeholder'; | ||
|
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 |
---|---|---|
|
@@ -57,3 +57,11 @@ ALTER EXTENSION timescaledb DROP VIEW timescaledb_information.chunk_columnstore_ | |
DROP VIEW timescaledb_information.hypertable_columnstore_settings; | ||
DROP VIEW timescaledb_information.chunk_columnstore_settings; | ||
|
||
-- Recreate `refresh_continuous_aggregate` procedure to remove the `force` argument | ||
DROP PROCEDURE IF EXISTS @[email protected]_continuous_aggregate (continuous_aggregate REGCLASS, window_start "any", window_end "any", force BOOLEAN); | ||
|
||
CREATE PROCEDURE @[email protected]_continuous_aggregate( | ||
continuous_aggregate REGCLASS, | ||
window_start "any", | ||
window_end "any" | ||
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_continuous_agg_refresh'; |
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
Oops, something went wrong.