Re: read-only database
Satoshi Nagayasu <nagayasus@nttdata.co.jp>
From: Satoshi Nagayasu <nagayasus@nttdata.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-patches@postgresql.org
Cc: pgsql-hackers@postgresql.org
Date: 2005-03-21T05:11:42Z
Lists: pgsql-hackers
Attachments
- readonlycluster.diff (text/plain) patch
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@nttdata.co.jp> OpenSource Development Center, NTT DATA Corp. http://www.nttdata.co.jp