Bug 29938

Summary: Allow a secondary database
Product: Koha Reporter: paxed <pasi.kallinen>
Component: DatabaseAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description paxed 2022-01-25 11:31:01 UTC
Our database has two servers, primary and secondary where the data is replicated from primary to secondary. Koha can only use the primary, which means the secondary is sitting idle.

Allow defining a secondary database server in koha-conf.

Allow executing some queries in the secondary instead of the primary one. Specifically, the saved reports would have the most benefit here:

1) Reports only do selects, never anything that changes the database, so are safe to do on the secondary server.
2) Normally, running very heavy reports can affect Koha use. If the queries were executed on the secondary server, they would have no effect on Koha.
3) It generally doesn't matter if report data is few minutes old.