Well, as an aside, I am planning to use RAMDISK for my new 
production-server, as a read-only database.
The approach is to use PosgreSQL's Master/Standby Streaming-Replication 
features.
It goes like this:
You have 2 instances of PostgreSQL:
1. Master : For write-only, with a data-directory sitting on our SAN 
storage, mounted via NFS,
2. Standby : For read-only, with a data-directory sitting on a RAMDISK 
mount-point.

In addition, I plan to use PG-POOL, a PostgreSQL-specific tool, as a 
font-proxy to these 2 servers.
The servers themselvs can be anywhere - preferably 2 separate-machines, or 
2 VMs.
PG-POOL would act as a proxy, and also as a connection-pool. It would 
analyze the queries, and automatically re-rout all reads to the 
RAMDISK-Standby, and all writes to the Master. It also takes care of 
managing the streaming-replication that is configured in PostgreSQL for 
replicating all of the writes done to the master, onto the read-only 
RAMDISK-Standby. The replication can be configured to be synchronousely or 
asynchrounousely. In a synchronouse configuration, a 
"write-transaction-commit" to the Master, would not be considered 
successfull, before a successful-replication of that transaction has been 
sent to the Standby-replica - meaning, only after a commit of the 
write-transaction has also been successfully recieved in the read-only 
replica (REAMDISK Standby), would the write-transaction on the master be 
considered complete and successful. This is the safest, albit-slowest 
approach. But it is only slow on writes, which are much less common on our 
web-app, so I can live with that.

I thought of using this approach to build a third replica, that is also 
writable, that only accepts schema-changes...

But I guess an SQLite option would do just fine.

I also like Anthony's option, I think it might even be faster that what you 
are currently doing in this experiment...
Anyways, interesting work here, I'll continue looking into it...

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to