Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: grammar and wording changes, removed section on JDBC driver
Section
Column
Info

These instructions will help you connect BellaDati to a PostgreSQL 8.4+ database. We are recommending the recommend using version 9.2 +or higher. It This document is intended for BellaDati WAR installations.

Before You Begin

Are You

Migrating BellaDati to

Another

a Different Server

?

If you are migrating BellaDati to another a different server, create an export of your data as an XML backup. You will then be able to transfer data from your old database to your new database.

Column
width300px
Panel

On this page:

Table of Contents
minLevel1
maxLevel4

...

  1. Create a database user which BellaDati will connect as (e.g. belladati_dbuser). (tick) Remember this database user name, as it will be used to configure BellaDati's connection to this database in subsequent steps. Do not forget to configure the pg_hba.conf file, which controls the database access.

    Code Block
    $ createuser -SDRP belladati_dbuser

  2. Create a database for BellaDati to be used as data warehouse (e.g. belladati_db) with Unicode collation.

    Code Block
    CREATE DATABASE belladati_db WITH ENCODING 'UNICODE';
    Or from the command-line:

    Code Block
    $ createdb -E UNICODE -O belladati_dbuser belladati_db
  3. Ensure that the user has permissions to connect to the database, and to create and write to tables in the database.
  4. Check if your database has the plpgsql language, if . If not, you can define it using this command:

    Code Block
    CREATE LANGUAGE plpgsql
    Or from the command - line:

    Code Block
    $ createlang -U belladati_dbuser plpgsql belladati_db

Note

When using the default PostgreSQL configuration file pg_hba.conf, you have to execute this command by connecting via TCP socket:
createlang -h 127.0.0.1 -U belladati_dbuser plpgsql belladati_db

Info

Remember this the database name, as ; it will be used to configure BellaDati's connection to this the database in subsequent steps.

Copy the PostgreSQL JDBC Driver to Your Application Server

Note

Skip this step if you are using BellaDati virtual applicance or BellaDati Standalone distribution. BellaDati virtual appliance includes the PostgreSQL JDBC driver.

...

.

...

...

PostgreSQL

...

PostgreSQL configuration

We are strongly recommending to perform strong recommend performing the following PostgreSQL configuration changes in $POSTGRES_HOME/data/postgresql.conf. This example specifies parameters when you are running run the BellaDati application and database on a single server with 4GB memory. 2GB of the are allocated for the BellaDati application server running on JAVA Java (using the -Xmx parameter). The rest should be available for the operating system and database server.

Name

Value

Note

max_connections

50

 

shared_buffers

512MB

min 1/4 RAM

temp_buffers

2MB

per session

work_mem

10MB

per client connection

maintenance_work_mem

64MB

 

max_stack_depth

2MB

 

wal_buffers

512kB

 

effective_cache_size

512MB

 

log_statement

none

 

Info

We are recommending recommend set the archive_mode parameter to off and , using of user defined the pg_dump command instead.

Backup and restore

You can backup the BellaDati 's database using the PostgreSQL dump command:

Code Block
pg_dump -U user -F c -v -f "path_to_dump/dump.backup" belladati_db

The restore is made by To restore a backup, use the pg_restore command:

Code Block
pg_restore -v -c -O -d belladati_db -U user path_to_dump/dump.backup

...

Continue configuring BellaDati WAR for your application server as described on: