Re: read-only database

Simon Riggs <simon@2ndquadrant.com>

From: Simon Riggs <simon@2ndquadrant.com>
To: Satoshi Nagayasu <nagayasus@nttdata.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2005-03-17T09:13:50Z
Lists: pgsql-hackers
On Thu, 2005-03-17 at 12:40 +0900, Satoshi Nagayasu wrote:
> Tom Lane wrote:
> >>I saw Oracle's reference manual, and found ALTER DATABASE OPEN READ ONLY command
> >>to make a stand-by database.
> > 
> > Perhaps, but that's *not* what the TODO item is about.
> 
> I see.
> 
> Thanks for comments.

The Oracle ALTER DATABASE command is part of the multi-step process to
mount an Oracle database into a running instance. It isn't something
that you can dip in and out of when you choose, as far as I am aware:
you can only run it on a warm standby database that is receiving logs
shipped from another database.
i.e. Oracle warm-standby databases have 3 run states (ok, more, but...)
1. warm standby
2. read-only
3. fully-operational
You can switch between 1 and 2 and back again, but once you go to 3 then
you cannot switch back.

What Tom just proposed about having an additional run-state between
running-recovery and fully-operational is essentially the same thing.
Tom's overall strategy would be workable in PostgreSQL terms, with some
work and would provide similar functionality to Oracle.

Having said that, I believe we're not close to making that work just yet
- its a good end goal because there may be choices along the way that
may need to consider the longer term goal.

Best Regards, Simon Riggs