Re: How to start a database in ReadOnly mode? - Mailing list pgsql-admin

From Greg Sabino Mullane
Subject Re: How to start a database in ReadOnly mode?
Date
Msg-id 5fe0d78bda51d7176940fb8e78739b54@biglumber.com
Whole thread Raw
In response to How to start a database in ReadOnly mode?  (Paul Schluck <pschluck@gmail.com>)
Responses Re: How to start a database in ReadOnly mode?
List pgsql-admin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> Is it possible to start a postgres cluster or 1 postgres database in
> readonly mode? And - if yes - how can this be done?

Clusterwide: edit postgresql.conf and set
default_transaction_read_only = on;

No restart needed, just a reload (HUP)

Database-wide:

ALTER DATABASE foobar SET default_transaction_read_only = true;

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201107090757
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAk4YQkIACgkQvJuQZxSWSsidzgCg1dpGvT6IY35NmMl1psiBlKuj
B2sAoJhdD3vlg0F/GwjhO1SCMfK/hhWS
=dRd9
-----END PGP SIGNATURE-----



pgsql-admin by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: row is too big during cluster
Next
From: Guillaume Lelarge
Date:
Subject: Re: How to start a database in ReadOnly mode?