pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <greg@turnstep.com>
To: pgsql-admin@postgresql.org
Cc: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=001485e76f4600a3c704a7756ca4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Mailing-List: pgsql-admin List-Archive: <http://archives.postgresql.org/pgsql-admin>
Cc: List-Help: <mailto:majordomo@postgresql.org?body=help>
Cc: List-ID: <pgsql-admin.postgresql.org>
Cc: List-Owner: <mailto:pgsql-admin-owner@postgresql.org>
Cc: List-Post: <mailto:pgsql-admin@postgresql.org>
Cc: List-Subscribe: <mailto:majordomo@postgresql.org?body=sub%20pgsql-admin>
Cc: List-Unsubscribe: Paul Schluck <pschluck@gmail.com>
Subject: Re: How to start a database in ReadOnly mode?
Date: Sat,  9 Jul 2011 11:58:52 -0000
Message-ID: <5fe0d78bda51d7176940fb8e78739b54@biglumber.com> (raw)
In-Reply-To: <CA+wekE8nPz9hP3k5pP26W561n2QZRb=6=oh5A78G9pAf1hy06g@mail.gmail.com>


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





view thread (5+ messages)  latest in thread

Message-ID: <5fe0d78bda51d7176940fb8e78739b54@biglumber.com>
Permalink:  ../5fe0d78bda51d7176940fb8e78739b54@biglumber.com/
Also on:    postgresql.org/message-id/5fe0d78bda51d7176940fb8e78739b54@biglumber.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: greg@turnstep.com, http://archives.postgresql.org/pgsql-admin, mailto:majordomo@postgresql.org?body=help, pgsql-admin.postgresql.org, mailto:pgsql-admin-owner@postgresql.org, mailto:pgsql-admin@postgresql.org, mailto:majordomo@postgresql.org?body=sub%20pgsql-admin, pschluck@gmail.com
  Subject: Re: How to start a database in ReadOnly mode?
  In-Reply-To: <5fe0d78bda51d7176940fb8e78739b54@biglumber.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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