Re: Query on pg_settings view

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Ronen Nofar <ronennofar(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Query on pg_settings view
Date: 2017-11-15 11:19:26
Message-ID: 20171115111926.GA4628@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* Laurenz Albe (laurenz(dot)albe(at)cybertec(dot)at) wrote:
> Ronen Nofar wrote:
> > I have a weird case when running a query on the pg_settings view.
> > I have two users, first one is the default user - postgres which is a superuser
> > and another one is a role which i had created, i called it test_role and it's not a superuser.
> > When I run a select on pg_settings with these two users I recieve different results.
>
> That is intentional, because some settings should only be
> visible for superusers, for example everything that has to
> do with the operating system (location of configuration file
> or socket directories).

This isn't quite correct any longer- with PG10, we have a default role
called 'pg_read_all_settings' which can be GRANT'd to other roles to
allow viewing of all settings, even those previously restricted to
superuser-only.

Thanks!

Stephen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message rakeshkumar464 2017-11-15 12:33:43 Re: pg_basebackup running from a remote machine
Previous Message Laurenz Albe 2017-11-15 10:16:19 Re: Query on pg_settings view