When attempting to query the pg_settings system view to pull out parameters, specific PL/Python parameters such as plpython3.python_path do not appear in the results.
Running a query similar to the following returns zero rows:
SELECT name, setting FROM pg_settings WHERE name ~ 'python_path';The plpython3.python_path GUC is defined dynamically within the PL/Python shared library (plpython3.so). Greenplum (and underlying PostgreSQL) does not load this shared library into the server process by default for every user session.
As a result, the server process will not recognize this GUC or display it in pg_settings until the library is actively loaded into the current session.
This behavior is expected. The library is loaded automatically whenever a plpython3 function is executed within the session.
If you need to query or set this GUC directly without running a function first, you must manually load the shared library into your session using the LOAD command.
For example:
Connect to the database. Notice that initially, the GUC is not recognized:
[gpadmin@[local]] gpadmin=# SELECT name, setting FROM pg_settings WHERE name ~ 'python_path';
name | setting
------+---------
(0 rows)
Manually load the PL/Python shared library:
[gpadmin@[local]] gpadmin=# LOAD 'plpython3';
LOAD
Query pg_settings again. The GUC will now be visible and accessible for the duration of the session:
[gpadmin@[local]] gpadmin=# SELECT name, setting FROM pg_settings WHERE name ~ 'python_path';
name | setting
-----------------------+-------------------------
plpython3.python_path | /home/gpadmin/my_python
(1 row)