From: Dan Langille Date: Fri, 14 Sep 2007 19:11:47 +0000 (+0000) Subject: Rearrange and expand the batch insert knob. X-Git-Tag: Release-3.0.0~2519 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ab1fcaad782354fff6a82e02f031578a7d2cbd10;p=bacula%2Fdocs Rearrange and expand the batch insert knob. Mention how to get Batch insert running with PostgreSQL and show what things to look for in what libraries. --- diff --git a/docs/manual/install.tex b/docs/manual/install.tex index d615b691..992a1356 100644 --- a/docs/manual/install.tex +++ b/docs/manual/install.tex @@ -730,13 +730,38 @@ customize your installation. the catalog database, which is much faster (10 times or more) than without this option for large numbers of files. However, this option will automatically be disabled if your SQL libraries are not - thread safe. SQLite2 is not thread safe, so this option cannot - be enabled when using it. However, on most systems, PostgreSQL, - and SQLite3 are thread safe. Bacula always links to the thread safe - MySQL libraries. + thread safe. If you find that batch mode is not enabled on your Bacula + installation, then your database most likely does not support threads. - As far as we can determine SQLite2 is not thread safe and so should - not be used if you have enabled batch insert in Bacula. + SQLite2 is not thread safe. Batch insert cannot be enabled when using + SQLite2 + + On most systems, PostgreSQL and SQLite3 are thread safe. + + To verify that your PostgreSQL is thread safe, you can try this + (change the path to point to your particular installed libpq.a; + these commands were issued on FreeBSD 6.2): + +\begin{verbatim} +$ nm /usr/local/lib/libpq.a | grep PQputCopyData +00001b08 T PQputCopyData +$ nm /usr/local/lib/libpq.a | grep mutex + U pthread_mutex_lock + U pthread_mutex_unlock + U pthread_mutex_init + U pthread_mutex_lock + U pthread_mutex_unlock +\end{verbatim} + + The above example shows a libpq that contains the required function + PQputCopyData and is thread enabled (i.e. the pthread_mutex* entries). + If you do not see PQputCopyData, your version of PostgreSQL is too old + to allow batch insert. If you do not see the mutex entries, then thread + support has not been enabled. Our tests indicate you usually need to + change the configuration options and recompile/reinstall the PostgreSQL + client software to get thread support. + + Bacula always links to the thread safe MySQL libraries. As a default, Bacula runs SQLite3 with {\bf PRAGMA synchronous=OFF} because it improves performance by more than 30 times. However, it