Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow non-superusers to run server-options test #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robins
Copy link

@robins robins commented Mar 3, 2022

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.

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.
@surajkharage19
Copy link

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
Copy link

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?

@mkgrgis
Copy link

mkgrgis commented Feb 15, 2023

Ping @robins ?

@robins
Copy link
Author

robins commented Feb 16, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants