-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename some objects `*citus_stats_tenants*` to `*citus_stat_tenants*` `citus_stats_tenants*` and `citus_stat_tenants*` GUCs to `stat_tenants*` `MultiTenantMonitoringLogLevel` to `CitusStatTenantsLogLevel` `multi_tenant_monitoring_log_level` to `citus.stat_tenants_log_level` `attribute` files to `citus_stat_tenants`
- Loading branch information
1 parent
e302be1
commit aeb604b
Showing
30 changed files
with
332 additions
and
332 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
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
26 changes: 13 additions & 13 deletions
26
...d/sql/udfs/citus_stats_tenants/11.3-1.sql → ...ed/sql/udfs/citus_stat_tenants/11.3-1.sql
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
32 changes: 32 additions & 0 deletions
32
src/backend/distributed/sql/udfs/citus_stat_tenants_local/11.3-1.sql
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
src/backend/distributed/sql/udfs/citus_stat_tenants_local/latest.sql
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,32 @@ | ||
CREATE OR REPLACE FUNCTION pg_catalog.citus_stat_tenants_local( | ||
return_all_tenants BOOLEAN DEFAULT FALSE, | ||
OUT colocation_id INT, | ||
OUT tenant_attribute TEXT, | ||
OUT read_count_in_this_period INT, | ||
OUT read_count_in_last_period INT, | ||
OUT query_count_in_this_period INT, | ||
OUT query_count_in_last_period INT, | ||
OUT score BIGINT) | ||
RETURNS SETOF RECORD | ||
LANGUAGE C | ||
AS 'citus', $$citus_stat_tenants_local$$; | ||
|
||
|
||
CREATE OR REPLACE VIEW citus.citus_stat_tenants_local AS | ||
SELECT | ||
colocation_id, | ||
tenant_attribute, | ||
read_count_in_this_period, | ||
read_count_in_last_period, | ||
query_count_in_this_period, | ||
query_count_in_last_period | ||
FROM pg_catalog.citus_stat_tenants_local() | ||
ORDER BY score DESC; | ||
|
||
ALTER VIEW citus.citus_stat_tenants_local SET SCHEMA pg_catalog; | ||
|
||
REVOKE ALL ON FUNCTION pg_catalog.citus_stat_tenants_local(BOOLEAN) FROM PUBLIC; | ||
GRANT EXECUTE ON FUNCTION pg_catalog.citus_stat_tenants_local(BOOLEAN) TO pg_monitor; | ||
|
||
REVOKE ALL ON pg_catalog.citus_stat_tenants_local FROM PUBLIC; | ||
GRANT SELECT ON pg_catalog.citus_stat_tenants_local TO pg_monitor; |
7 changes: 7 additions & 0 deletions
7
src/backend/distributed/sql/udfs/citus_stat_tenants_local_reset/11.3-1.sql
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
src/backend/distributed/sql/udfs/citus_stat_tenants_local_reset/latest.sql
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,7 @@ | ||
CREATE OR REPLACE FUNCTION pg_catalog.citus_stat_tenants_local_reset() | ||
RETURNS VOID | ||
LANGUAGE C STRICT | ||
AS 'MODULE_PATHNAME', $$citus_stat_tenants_local_reset$$; | ||
|
||
COMMENT ON FUNCTION pg_catalog.citus_stat_tenants_local_reset() | ||
IS 'resets the local tenant statistics'; |
8 changes: 8 additions & 0 deletions
8
src/backend/distributed/sql/udfs/citus_stat_tenants_reset/11.3-1.sql
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/backend/distributed/sql/udfs/citus_stat_tenants_reset/latest.sql
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,8 @@ | ||
CREATE OR REPLACE FUNCTION pg_catalog.citus_stat_tenants_reset() | ||
RETURNS VOID | ||
LANGUAGE plpgsql | ||
AS $function$ | ||
BEGIN | ||
PERFORM run_command_on_all_nodes($$SELECT citus_stat_tenants_local_reset()$$); | ||
END; | ||
$function$; |
Oops, something went wrong.