[Swift-commit] r2699 - provenancedb

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Mar 16 13:31:11 CDT 2009


Author: benc
Date: 2009-03-16 13:31:11 -0500 (Mon, 16 Mar 2009)
New Revision: 2699

Modified:
   provenancedb/provenance.xml
Log:
More work on making provenance code easily switchable between sqlite and postgres.

Modified: provenancedb/provenance.xml
===================================================================
--- provenancedb/provenance.xml	2009-03-16 18:30:10 UTC (rev 2698)
+++ provenancedb/provenance.xml	2009-03-16 18:31:11 UTC (rev 2699)
@@ -97,6 +97,11 @@
 
 <section><title>Configuring your SQL database</title>
 <para>
+Follow the instructions in one of the following sections, to configure your
+database either for sqlite3 or for postgres.
+</para>
+<section><title>Configuring your sqlite3 SQL database</title>
+<para>
 This section describes configuring the SQL scripts to use 
 <ulink url="http://www.sqlite.org/">sqlite</ulink>, which is
 appropriate for a single-user installation.
@@ -109,6 +114,63 @@
 probably work under Linux.
 </para>
 <para>
+In the next section, you will create a <literal>provenance.config</literal>
+file. In that, you should configure the use of sqlite3 by specifying:
+<screen>
+export SQLCMD="sqlite3 provdb "
+</screen>
+(note the trailing space before the closing quote)
+</para>
+</section>
+
+<section><title>Configuring your own postgres 8.3 SQL database</title>
+<para>
+This section describes configuring a postgres 8.3 database, which is
+appropriate for a large installation (where large means lots of log
+files or multiple users)
+</para>
+<para>
+First install and start postgres as appropriate for your platform
+(using <command>apt-get</command> or <command>port</command> for example).
+</para>
+<para>
+As user <literal>postgres</literal>, create a database:
+<screen>
+$ <userinput>/opt/local/lib/postgresql83/bin/createdb provtest1</userinput>
+</screen>
+</para>
+<para>
+Check that you can connect and see the empty database:
+<screen>
+$ <userinput>psql83 -d provtest1 -U postgres</userinput>
+Welcome to psql83 8.3.6, the PostgreSQL interactive terminal.
+
+Type:  \copyright for distribution terms
+       \h for help with SQL commands
+       \? for help with psql commands
+       \g or terminate with semicolon to execute query
+       \q to quit
+
+provtest1=# <userinput>\dt</userinput>
+No relations found.
+provtest1=# <userinput>\q</userinput>
+</screen>
+</para>
+<para>
+In the next section, when configuring <literal>provenance.config</literal>,
+specify the use of postgres like this:
+<screen>
+export SQLCMD="psql83 -d provtest1 -U postgres "
+</screen>
+Note the trailing space before the final quote. Also, note that if you
+fiddled the above test command line to make it work, you will have to make
+similar fiddles in the <literal>SQLCMD</literal> configuration line.
+</para>
+</section>
+</section>
+
+<section><title>Import your logs</title>
+<para>
 Now create a <filename>etc/provenance.config</filename> file to define local
 configuration. An example that I use on my laptop is present in
 <filename>provenance.config.soju</filename>.
@@ -123,7 +185,9 @@
 $ <userinput>./swift-prov-import-all-logs rebuild</userinput>
 </screen>
 </para>
+
 </section>
+
 <section><title>Querying the newly generated database</title>
 <para>
 You can use <command>swift-about-*</command> commands, described in




More information about the Swift-commit mailing list