Skip to content

Commit

Permalink
[#20920] YSQL, ASH: Update yb_active_session_history column names
Browse files Browse the repository at this point in the history
Summary:
This diff updates two column names for the view yb_active_session_history.

`yql_endpoint_tserver_uuid` is updated to `top_level_node_id`, based on the
feedback that the former was not intuitive.

`session_id` is updated to `ysql_session_id` as this is ysql field.

The migration script which introduced the view is updated as there have been
no releases with this script.

Jira: DB-9902

Test Plan:
./yb_build.sh --java-test TestYbAsh
./yb_build.sh --java-test TestYsqlUpgrade
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressRules#testPgRegressRules'

Reviewers: jason

Reviewed By: jason

Subscribers: hbhanawat, amitanand, yql

Differential Revision: https://phorge.dev.yugabyte.com/D32646
  • Loading branch information
abhinab-yb committed Feb 27, 2024
1 parent 1d4ca2b commit f9ca647
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/postgres/src/include/catalog/pg_proc.dat
Original file line number Diff line number Diff line change
Expand Up @@ -10484,6 +10484,6 @@
prorettype => 'record', proargtypes => '',
proallargtypes => '{timestamptz,uuid,int8,text,text,text,uuid,int8,int8,text,text,float4}',
proargmodes => '{o,o,o,o,o,o,o,o,o,o,o,o}',
proargnames => '{sample_time,root_request_id,rpc_request_id,wait_event_component,wait_event_class,wait_event,yql_endpoint_tserver_uuid,query_id,session_id,client_node_ip,wait_event_aux,sample_weight}',
proargnames => '{sample_time,root_request_id,rpc_request_id,wait_event_component,wait_event_class,wait_event,top_level_node_id,query_id,ysql_session_id,client_node_ip,wait_event_aux,sample_weight}',
prosrc => 'yb_active_session_history'},
]
6 changes: 3 additions & 3 deletions src/postgres/src/test/regress/expected/yb_pg_rules.out
Original file line number Diff line number Diff line change
Expand Up @@ -2423,13 +2423,13 @@ yb_active_session_history| SELECT yb_active_session_history.sample_time,
yb_active_session_history.wait_event_component,
yb_active_session_history.wait_event_class,
yb_active_session_history.wait_event,
yb_active_session_history.yql_endpoint_tserver_uuid,
yb_active_session_history.top_level_node_id,
yb_active_session_history.query_id,
yb_active_session_history.session_id,
yb_active_session_history.ysql_session_id,
yb_active_session_history.client_node_ip,
yb_active_session_history.wait_event_aux,
yb_active_session_history.sample_weight
FROM yb_active_session_history() yb_active_session_history(sample_time, root_request_id, rpc_request_id, wait_event_component, wait_event_class, wait_event, yql_endpoint_tserver_uuid, query_id, session_id, client_node_ip, wait_event_aux, sample_weight);
FROM yb_active_session_history() yb_active_session_history(sample_time, root_request_id, rpc_request_id, wait_event_component, wait_event_class, wait_event, top_level_node_id, query_id, ysql_session_id, client_node_ip, wait_event_aux, sample_weight);
yb_terminated_queries| SELECT d.datname AS databasename,
s.backend_pid,
s.query_text,
Expand Down
4 changes: 2 additions & 2 deletions src/yb/yql/pgwrapper/ysql_migrations/V45__19128__yb_ash.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ BEGIN;
(8065, 'yb_active_session_history', 11, 10, 12, 1, 100000, 0, '-', 'f', false,
false, true, true, 'v', 'r', 0, 0, 2249, '', '{1184,2950,20,25,25,25,2950,20,20,25,25,700}',
'{o,o,o,o,o,o,o,o,o,o,o,o}', '{sample_time,root_request_id,rpc_request_id,
wait_event_component,wait_event_class,wait_event,yql_endpoint_tserver_uuid,query_id,
session_id,client_node_ip,wait_event_aux,sample_weight}',
wait_event_component,wait_event_class,wait_event,top_level_node_id,query_id,
ysql_session_id,client_node_ip,wait_event_aux,sample_weight}',
NULL, NULL, 'yb_active_session_history', NULL, NULL, NULL)
ON CONFLICT DO NOTHING;

Expand Down

0 comments on commit f9ca647

Please sign in to comment.