Skip to content

Commit

Permalink
Fix Cherry-pick Resgroup V2 and toolkit from GPDB
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaqizho committed Jul 23, 2024
1 parent 744feb5 commit f812bdb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
14 changes: 11 additions & 3 deletions gpcontrib/gp_toolkit/gp_toolkit--1.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ CREATE SCHEMA gp_toolkit;

GRANT USAGE ON SCHEMA gp_toolkit TO public;

-- FIXME: remove it after 0d0fdc75ae5b72d42be549e234a29546efe07ca2
CREATE OR REPLACE VIEW gp_stat_activity AS
SELECT gp_execution_segment() as gp_segment_id, * FROM gp_dist_random('pg_stat_activity')
UNION ALL SELECT -1 as gp_segment_id, * from pg_stat_activity;


GRANT SELECT ON TABLE gp_stat_activity TO public;

--------------------------------------------------------------------------------
-- Auxiliary functions & views
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -1963,12 +1971,12 @@ LANGUAGE plpgsql;
--
--------------------------------------------------------------------------------

CREATE FUNCTION gp_toolkit.__gp_workfile_entries_f_on_master()
CREATE FUNCTION gp_toolkit.__gp_workfile_entries_f_on_coordinator()
RETURNS SETOF record
AS '$libdir/gp_workfile_mgr', 'gp_workfile_mgr_cache_entries'
LANGUAGE C VOLATILE EXECUTE ON COORDINATOR;

GRANT EXECUTE ON FUNCTION gp_toolkit.__gp_workfile_entries_f_on_master() TO public;
GRANT EXECUTE ON FUNCTION gp_toolkit.__gp_workfile_entries_f_on_coordinator() TO public;

CREATE FUNCTION gp_toolkit.__gp_workfile_entries_f_on_segments()
RETURNS SETOF record
Expand All @@ -1990,7 +1998,7 @@ GRANT EXECUTE ON FUNCTION gp_toolkit.__gp_workfile_entries_f_on_segments() TO pu
CREATE VIEW gp_toolkit.gp_workfile_entries AS
WITH all_entries AS (
SELECT C.*
FROM gp_toolkit.__gp_workfile_entries_f_on_master() AS C (
FROM gp_toolkit.__gp_workfile_entries_f_on_coordinator() AS C (
segid int,
prefix text,
size bigint,
Expand Down
8 changes: 8 additions & 0 deletions gpcontrib/gp_toolkit/gp_toolkit--1.3.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@

GRANT USAGE ON SCHEMA gp_toolkit TO public;

-- FIXME: remove it after 0d0fdc75ae5b72d42be549e234a29546efe07ca2
CREATE OR REPLACE VIEW gp_stat_activity AS
SELECT gp_execution_segment() as gp_segment_id, * FROM gp_dist_random('pg_stat_activity')
UNION ALL SELECT -1 as gp_segment_id, * from pg_stat_activity;


GRANT SELECT ON TABLE gp_stat_activity TO public;

--------------------------------------------------------------------------------
-- @view:
-- gp_toolkit.__gp_is_append_only
Expand Down
6 changes: 0 additions & 6 deletions src/test/regress/greenplum_schedule
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ test: gp_dispatch_keepalives
test: copy_eol

test: disable_autovacuum
# test gp_fastsequence allocation (early in schedule as log grepping is expensive)
# These tests gp_log_system could have issue reading partial log that's generated
# from concurrent test. So anything that uses it needs to be run alone.
test: uao_dml/gp_fastsequence_row
test: uao_dml/gp_fastsequence_column

test: python_processed64bit
test: enable_autovacuum

Expand Down

0 comments on commit f812bdb

Please sign in to comment.