gp_session_role GUC

14 views
Skip to first unread message

Ashwin Agrawal

unread,
Jan 31, 2023, 7:05:17 PM1/31/23
to Greenplum Developers
Commit  f6297b96ee "Retire guc gp_session_role" (PR https://github.com/greenplum-db/gpdb/pull/9396) consolidated the functionality of two GUCs gp_session_role and gp_role into gp_role. That's a good aspect and it removed the redundancy and confusion in code from existence of these two GUCs.

Though the usage of gp_session_role in frontend utilities, support tools plus developer day-to-day life is heavy compared to gp_role. All these places need to have unnecessary code based on the version if 6X and lower - use gp_session_role else use gp_role distinction.

Thinking, instead of completely retiring gp_session_role GUC lets just make it point to the same variable as gp_role. Effectively, consolidating them to the same functionality. Then based on the version won't have to differentiate usage of different GUC. Effectively, meeting the end goal of PR to remove code complexity without making any user facing change.

Complexity with having two GUC names point to the same variable is similar to specifying the same GUC with different values. Whichever appears last will take the effect. Example:
"-c gp_session_role=dispatch -c gp_role=utility" final result would be utility mode connection.

Thoughts?

--
Ashwin Agrawal (VMware)

Jimmy Yih

unread,
Jan 31, 2023, 7:33:20 PM1/31/23
to Ashwin Agrawal, Greenplum Developers
Most tools have already adopted the difference and have logic to work around it... but it would definitely be helpful to bring gp_session_role back as a deprecated GUC (copy of gp_role) instead of entirely removing it. Once GPDB 6X is out of support, we can fully remove gp_session_role from the main GPDB branch and flip the GUC to gp_role on all external tools.

________________________________________
From: Ashwin Agrawal <ashwi...@gmail.com>
Sent: Tuesday, January 31, 2023 4:05 PM
To: Greenplum Developers
Subject: gp_session_role GUC

!! External Email
Commit f6297b96ee "Retire guc gp_session_role" (PR https://github.com/greenplum-db/gpdb/pull/9396<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgreenplum-db%2Fgpdb%2Fpull%2F9396&data=05%7C01%7Cjyih%40vmware.com%7C9c296e594e694de51a5a08db03e80763%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638108067318008524%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=56qqDJke9Z6hdemTNHxorTmYTQwQbxoirfQR5G4dBtI%3D&reserved=0>) consolidated the functionality of two GUCs gp_session_role and gp_role into gp_role. That's a good aspect and it removed the redundancy and confusion in code from existence of these two GUCs.
!! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.

Adam Lee

unread,
Feb 1, 2023, 1:21:07 AM2/1/23
to Jimmy Yih, Ashwin Agrawal, Greenplum Developers

This brings up my memory, there is an issue due to the retirement of GUC gp_session_role.

 

https://github.com/greenplum-db/gpdb/issues/12217

 

Please check the comments I left.

https://github.com/greenplum-db/gpdb/issues/12217#issuecomment-914123314

https://github.com/greenplum-db/gpdb/issues/12217#issuecomment-1411525227

 

From: 'Jimmy Yih' via Greenplum Developers <gpdb...@greenplum.org>
Date: Wednesday, February 1, 2023 at 08:33
To: Ashwin Agrawal <ashwi...@gmail.com>, Greenplum Developers <gpdb...@greenplum.org>
Subject: Re: gp_session_role GUC

!! External Email

Most tools have already adopted the difference and have logic to work around it... but it would definitely be helpful to bring gp_session_role back as a deprecated GUC (copy of gp_role) instead of entirely removing it.  Once GPDB 6X is out of support, we can fully remove gp_session_role from the main GPDB branch and flip the GUC to gp_role on all external tools.

________________________________________
From: Ashwin Agrawal <ashwi...@gmail.com>
Sent: Tuesday, January 31, 2023 4:05 PM
To: Greenplum Developers
Subject: gp_session_role GUC

!! External Email

Commit  f6297b96ee "Retire guc gp_session_role" (PR https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgreenplum-db%2Fgpdb%2Fpull%2F9396&data=05%7C01%7Cadlee%40vmware.com%7C06fa4326105242842cb308db03ebf232%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638108084146544591%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=HN2XcmIdnNP0d0u2xbNCj2eDBvYfRDgkuaYx5j5azF8%3D&reserved=0<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgreenplum-db%2Fgpdb%2Fpull%2F9396&data=05%7C01%7Cadlee%40vmware.com%7C06fa4326105242842cb308db03ebf232%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638108084146544591%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=HN2XcmIdnNP0d0u2xbNCj2eDBvYfRDgkuaYx5j5azF8%3D&reserved=0>) consolidated the functionality of two GUCs gp_session_role and gp_role into gp_role. That's a good aspect and it removed the redundancy and confusion in code from existence of these two GUCs.

Reply all
Reply to author
Forward
0 new messages