Home PostgreSQL High temperature physics

High temperature physics

by admin

Everyone has probably noticed by now that PostgreSQL 8.4 has new mode database operation : Warm standby With it, during the operation of the Write-Ahead logs (WAL) are broadcast to the subordinate database, on which in real time are applied as if it happened on the main system. So if the main database fails for some reason (lightning/tornado/World War III/other natural disasters), you can instantly switch to a slave database (which will have sufficiently up-to-date data compared to the main database) and use it further.
But unfortunately, the "warm standby" implies that the slave system is continuously rebuilding the database; which means that as long as the main database is alive, the slave database cannot be used.
If you read at least depesz blog (not to mention the commit logs), then you already know where I’m going with this; if not… On December 19 last year, in the version 8.5 of PostgreSQL under development, the following functionality was added Hot standby Now, when setting up WAL replication, the slave database can also be used for SELECT queries (and only SELECT, for obvious reasons). Previously, a second server with a second database would sit idle, waiting for a force majeure, and the admins would blush in front of the managers when asked about hardware efficiency, but now this server, with the right application logic, will help unload the main database.
You can read more about the operation of Hot standby at related article from the documentation of the PostgreSQL version under development.

You may also like