From a69f9918cd1d3a0ca5fec28ac71801ff223435ae Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 7 Oct 2013 11:29:52 +0200 Subject: Improve selection of replicated database connection: - Analyze query and prefer dsnr unless a write operation for a table involved has been carried out before - New config option and setter method to enforce connection mode on table level --- config/defaults.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'config') diff --git a/config/defaults.inc.php b/config/defaults.inc.php index 66db040d3..9afa4ac81 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -41,6 +41,16 @@ $config['db_persistent'] = false; // you can define specific table (and sequence) names prefix $config['db_prefix'] = ''; +// Mapping of table names and connections to use for ALL operations. +// This can be used in a setup with replicated databases and a DB master +// where read/write access to cache tables should not go to master. +$config['db_table_dsn'] = array( +// 'cache' => 'r', +// 'cache_index' => 'r', +// 'cache_thread' => 'r', +// 'cache_messages' => 'r', +); + // ---------------------------------- // LOGGING/DEBUGGING -- cgit v1.2.3