vmware-archive / sre-test

Greenplum - Open Source SRE test project.
2 stars 0 forks source link

db_user_namespace parameter issue #171

Closed bala-cg closed 2 years ago

bala-cg commented 3 years ago

Page No : 1320

Issue 1: changing value to 'on', can potentially block DB access. Issue 2: As per the documentation it says this will take effect after restart, but this takes effect with GP reload (gpstop -u)

[gpadmin@mdw_ipv4 ~]$ gpconfig -s db_user_namespace Values on all segments are consistent GUC : db_user_namespace Master value: off Segment value: off [gpadmin@mdw_ipv4 ~]$ [gpadmin@mdw_ipv4 ~]$ gpconfig -c db_user_namespace -v on 20210709:14:21:02:024686 gpconfig:mdw_ipv4:gpadmin-[INFO]:-completed successfully with parameters '-c db_user_namespace -v on' [gpadmin@mdw_ipv4 ~]$ [gpadmin@mdw_ipv4 ~]$ [gpadmin@mdw_ipv4 ~]$ gpconfig -s db_user_namespace Values on all segments are consistent GUC : db_user_namespace Master value: off Segment value: off [gpadmin@mdw_ipv4 ~]$ [gpadmin@mdw_ipv4 ~]$ [gpadmin@mdw_ipv4 ~]$ gpstop -u 20210709:14:21:19:024810 gpstop:mdw_ipv4:gpadmin-[INFO]:-Starting gpstop with args: -u 20210709:14:21:19:024810 gpstop:mdw_ipv4:gpadmin-[INFO]:-Gathering information and validating the environment... 20210709:14:21:19:024810 gpstop:mdw_ipv4:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information 20210709:14:21:19:024810 gpstop:mdw_ipv4:gpadmin-[INFO]:-Obtaining Segment details from master... 20210709:14:21:19:024810 gpstop:mdw_ipv4:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 6.16.0 build commit:5650be2b79197fed564dca8d734d10f2a76b876c' 20210709:14:21:19:024810 gpstop:mdw_ipv4:gpadmin-[INFO]:-Signalling all postmaster processes to reload [gpadmin@mdw_ipv4 ~]$ [gpadmin@mdw_ipv4 ~]$ [gpadmin@mdw_ipv4 ~]$ gpconfig -s db_user_namespace 20210709:14:21:21:024849 gpconfig:mdw_ipv4:gpadmin-[ERROR]:-Failed to retrieve GUC information: FATAL: no pg_hba.conf entry for host "::1", user "gpadmin@template1", database "template1", SSL off

'NoneType' object is not iterable [gpadmin@mdw_ipv4 ~]$ psql psql: FATAL: no pg_hba.conf entry for host "[local]", user "gpadmin@gpadmin", database "gpadmin", SSL off [gpadmin@mdw_ipv4 ~]$ [gpadmin@mdw_ipv4 ~]$

edespino commented 3 years ago

@bala-cg When db_user_namespace parameter is enabled, global users need to add an @ to the end of their names. In the example above, you can access the DB with psql -U gpadmin@. So lockout is not an issue.

I believe all we need to address here is the need to modify a reload and not restart is needed to enable this parameter.

edespino commented 3 years ago

@bala-cg If the db_user_namespace parameter is enabled, the gpstate, gpstart, gpstart don't work properly. I've had minimum success.

@ashwinstar I'm leaning toward disabling the use of the db_user_namespace parameter. Thoughts?

ashwinstar commented 3 years ago

Yes, first time reading up on it. PostgreSQL docs suggest its a hack and possibly should stay away from it unless really really necessary. For GPDB, possibly we can take harder stand on it and not support it and hide it.