Skip site navigation (1) Skip section navigation (2)

Re: read-only database

From: Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: read-only database
Date: 2005-03-21 05:11:42
Message-ID: 423E578E.10008@nttdata.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> I'd view this as a postmaster state that propagates to backends.
> Probably you'd enable it by means of a postmaster option, and the
> only way to get out of it is to shut down and restart the postmaster
> without the option.

I've created a patch to make a postmaster read-only.
(attached patch can be applied to 8.0.1)

Read-only state can be enabled/disabled by the postmaster option,
or the postgresql.conf option.

If you start the postmaster with "-r" options,
the cluster will go to read-only.

% pg_ctl -o "-i -r" -D $PGDATA start

Or if you set "readonly_cluster = true" in the postgresql.conf,
the cluster will also become read-only.

Any comments?
-- 
NAGAYASU Satoshi <nagayasus(at)nttdata(dot)co(dot)jp>
OpenSource Development Center,
NTT DATA Corp. http://www.nttdata.co.jp

Attachment: readonlycluster.diff
Description: text/plain (3.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Ali BabaDate: 2005-03-21 06:21:08
Subject: custome exception handling support ?
Previous:From: Joshua D. DrakeDate: 2005-03-21 04:21:30
Subject: Re: Very strange query difference between 7.3.6 and 7.4.6

pgsql-patches by date

Next:From: Neil ConwayDate: 2005-03-21 05:26:38
Subject: Re: [patch 0/6] pgcrypto update
Previous:From: Tom LaneDate: 2005-03-21 01:39:42
Subject: Re: PL/Python patch for Universal Newline Support

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group