pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
make postgres readonly
3+ messages / 3 participants
[nested] [flat]

* make postgres readonly
@ 2021-03-02 15:28 Stephan Hahn <stephan-hahn@gmx.net>
  2021-03-02 17:25 ` Re: make postgres readonly Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Stephan Hahn @ 2021-03-02 15:28 UTC (permalink / raw)
  To: pgsql-admin

Does it cause any problems if i set the user postgres to readonly? This could
be helpful while using several individual superusers.



--
Sent from: https://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: make postgres readonly
  2021-03-02 15:28 make postgres readonly Stephan Hahn <stephan-hahn@gmx.net>
@ 2021-03-02 17:25 ` Tom Lane <tgl@sss.pgh.pa.us>
  2021-03-03 14:36   ` Re: make postgres readonly stephanhahn <stephan.hahn@muenchen.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2021-03-02 17:25 UTC (permalink / raw)
  To: Stephan Hahn <stephan-hahn@gmx.net>; +Cc: pgsql-admin

Stephan Hahn <stephan-hahn@gmx.net> writes:
> Does it cause any problems if i set the user postgres to readonly?

Not really sure what you have in mind there, but superusers bypass
all permissions checks.  Even if it worked, it'd be likely to break
the autovacuum daemon.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: make postgres readonly
  2021-03-02 15:28 make postgres readonly Stephan Hahn <stephan-hahn@gmx.net>
  2021-03-02 17:25 ` Re: make postgres readonly Tom Lane <tgl@sss.pgh.pa.us>
@ 2021-03-03 14:36   ` stephanhahn <stephan.hahn@muenchen.de>
  0 siblings, 0 replies; 3+ messages in thread

From: stephanhahn @ 2021-03-03 14:36 UTC (permalink / raw)
  To: pgsql-admin

Hi Tom, thanks for the reply. I set default_transaction_read_only = on for
the user postgres (seemed to be more practical for me than preventing every
access with pg_hba.conf and create an extra backup user).
Up to now i didn't notice any unwanted effects resulting from this. There
are also still many log entries of the sort 'automatic vacuum of table
"tablename": index scans: 1' (and a few like "@ ERROR: canceling autovacuum
task", which might have other reasons?), so this could suggest a working
autovacuum daemon.
But if you nevertheless think this approach can have any side effects
(because postgres is not only a superuser, but is also used by the DB
system), it seems to be too dangerous for me.



--
Sent from: https://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-03-03 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 15:28 make postgres readonly Stephan Hahn <stephan-hahn@gmx.net>
2021-03-02 17:25 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-03-03 14:36   ` stephanhahn <stephan.hahn@muenchen.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox