read-only database - Mailing list pgsql-hackers

From Satoshi Nagayasu
Subject read-only database
Date
Msg-id 42382661.4030001@nttdata.co.jp
Whole thread Raw
Responses Re: read-only database  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi all,

I've read TODO list in the 8.0.1,
then I'm interested in the following topic.

> * Allow a warm standby system to also allow read-only queries

Does anyone have any plan to work on this?

I think we need to extend the pg_database catalog to
have a database state (read-only or writable),
and also need to extend ALTER DATABASE command
to change the state.

To make a database read-only, ALTER DATABASE command may change
MyDatabaseReadOnly flag (like XactReadOnly)
and update the pg_database catalog.
If MyDatabaseReadOnly is true, check_xact_readonly() or
ExecCheckXactReadOnly() will prevent from updating the database.

Otherwise, I think we can also prevent from updating the database
around acquiring the XLogInsert lock.

Any ideas?  or any suggestions?

-- 
NAGAYASU Satoshi <nagayasus@nttdata.co.jp>
OpenSource Development Center,
NTT DATA Corp. http://www.nttdata.co.jp



pgsql-hackers by date:

Previous
From: David Pradier
Date:
Subject: Re: Erratic error message "ERROR: column "id_compte" does
Next
From: strk@refractions.net
Date:
Subject: Re: caches lifetime with SQL vs PL/PGSQL procs