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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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 Content-Type Size
readonlycluster.diff text/plain 3.4 KB

In response to

Responses

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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