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