Added by Bart van der Schans, last edited by Bartosz Oudekerk on May 28, 2008  (view change)

Labels:

repository repository Delete
slide slide Delete
postgresql postgresql Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Sample of a definition.xml for postgreSQL:

<?xml version="1.0"?>
<definition>
  <store name="default">
    <parameter name="tlock-timeout">120</parameter>
    <parameter name="cache-mode">full</parameter>
    <parameter name="object-cache-size">1000</parameter>
    <parameter name="permission-cache-size">1000</parameter>
    <parameter name="lock-cache-size">100</parameter>

    <parameter name="descriptors-cache-size">10000</parameter>
    <parameter name="descriptor-cache-size">10000</parameter>
    <parameter name="content-cache-size">10000</parameter>
    <parameter name="enable-content-caching">false</parameter>
    <parameter name="tx-content-cache-size">1000</parameter>
    <parameter name="content-cache-bytes">10000000</parameter>

    <parameter name="tx-content-cache-bytes">1000000</parameter>
    <parameter name="max-content-bytes-per-entry">50000</parameter>

    <parameter name="basicQueryClass">org.apache.slide.search.basic.LuceneBasicQuery</parameter>
    <parameter name="basicQueryEnvelopeClass">org.apache.slide.search.basic.LuceneBasicQueryEnvelope</parameter>

    <nodestore classname="org.apache.slide.store.impl.rdbms.JDBCStore">
      <parameter name="adapter">org.apache.slide.store.impl.rdbms.PostgresRDBMSAdapter</parameter>
      <parameter name="driver">org.postgresql.Driver</parameter>
      <parameter name="url">jdbc:postgresql://localhost:5432/slide</parameter>

      <parameter name="user">slide</parameter>
      <parameter name="password">secret</parameter>
      <parameter name="dbcpPooling">true</parameter>
      <parameter name="dbcp.testWhileIdle">true</parameter>
      <parameter name="dbcp.timeBetweenEvictionRunsMillis">900000</parameter>
      <parameter name="dbcp.validationQuery">SELECT 1</parameter>
      <parameter name="dbcp.maxActive">20</parameter>
      <parameter name="isolation">READ_COMMITTED</parameter>
      <parameter name="compress">false</parameter>

      <parameter name="use-rdbms-expression-factory">true</parameter>
      <parameter name="tlock-timeout">120</parameter>
    </nodestore>
    <contentstore>
      <reference store="nodestore"/>
      <parameter name="tlock-timeout">120</parameter>
    </contentstore>

    <securitystore>
      <reference store="nodestore"/>
    </securitystore>
    <lockstore>
      <reference store="nodestore"/>
    </lockstore>
    <revisiondescriptorsstore>
      <reference store="nodestore"/>
    </revisiondescriptorsstore>

    <revisiondescriptorstore>
      <reference store="nodestore"/>
    </revisiondescriptorstore>
  </store>
  <scope match="/" store="default"/>
</definition>

You can use following setup scripts:

Don't forget to

  • Adapt the build.properties when using postgreSQL
  • Add the postgreSQL jdbc driver to the repositories project.xml as dependency

For postgreSQL 8.1, change the db configuration:

  • use default charset latin1 instead of utf-8
  • in postgresql.conf, set 'add_missing_from = on'