mysql_fdw icon indicating copy to clipboard operation
mysql_fdw copied to clipboard

Allow non-superusers to run server-options test

Open robins opened this issue 3 years ago • 4 comments

Allow non-superusers to run server-options regression test.

The server_options test uses pg_user_mapping catalog that is only available to postgres superusers. Thus means non-superusers fail this regression test by design.

Since most of that data is already available in pg_user_mappings view, using that instead additionally allows non-superusers to pass the test.

robins avatar Mar 03 '22 12:03 robins

Hi @robins,

On a quick look, your suggestion seems reasonable to me. We will take this forward and try to commit the same. Thanks.

surajkharage19 avatar Mar 03 '22 13:03 surajkharage19

Hi @robins,

Non-superuser can't run the regression using 'make installcheck' command as they don't have permission to set the parameters such as lc_messages, lc_monetary etc. Also, if no-superuser executes the test case files manually on the database then he might get error while creating the extension, so I am just wondering how you are able to run the regression/test case files using non-superuser at your end. Can you please brief about the use case?

surajkharage19 avatar Mar 22 '22 14:03 surajkharage19

Ping @robins ?

mkgrgis avatar Feb 15 '23 15:02 mkgrgis

Apologies @surajkharage19 on missing this earlier.

That understanding is correct (in that make installcheck would still have superuser dependencies).

This PR was submitted a while back, but IIRC, this patch allows running regression tests directly (with pg_regress). There could be other scenarios where this may be helpful, but IIRC the idea came up when trying to support this extension for RDS Postgres and this PR allows for some additional tests to be automated without breaking anything for existing users.

robins avatar Feb 16 '23 22:02 robins