These instructions will help you connect BellaDati application to a PostgreSQL database.

    We recommend using database engines  PostgreSQL 9.5 or PostgreSQL 9.6.

    Starting BellaDati version PostgreSQL 9.6 database engine is tested and recommended too.

    On this page:

    Create and Configure the PostgreSQL Database

    Setup the pg_hba.conf file to allow accessing the database via TCP socket. Here is an example:



    1. Create a database user which BellaDati will connect as (e.g. belladati_dbuser). 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.

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

      Or from the command-line:

    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 not, you can define it using this command:

      Or from the command line:


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


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

    PostgreSQL configuration

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


    This configuration may change according to real usage needs.

    Example below shows the minimal configuration for single server installation.







    Sets the maximum number of concurrent connections.




    Sets the number of shared memory buffers used by the server.

    min 1/4 RAM, 1/2 RAM recommended



    Sets the maximum number of temporary buffers used by each session.

    per session



    Sets the maximum memory to be used for query workspaces.

    min 16MB, RAM / 128 recommended



    Sets the maximum memory to be used for maintenance operations.

    min 64MB, RAM / 32 recommeneded



    Sets the maximum stack depth, in kilobytes.




    Sets the number of disk-page buffers in shared memory for WAL.




    Sets the planner's assumption about the size of the disk cache.

    RAM / 2 recommended



    Sets the type of statements logged.


    autovacuumonStarts the autovacuum subprocess. 
    autovacuum_analyze_scale_factor0.05Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples. 
    autovacuum_analyze_threshold10Minimum number of tuple inserts, updates, or deletes prior to analyze. 
    autovacuum_freeze_max_age200000000Age at which to autovacuum a table to prevent transaction ID wraparound. 
    autovacuum_max_workers5Sets the maximum number of simultaneously running autovacuum worker processes. 
    autovacuum_multixact_freeze_max_age400000000Multixact age at which to autovacuum a table to prevent multixact wraparound. 
    autovacuum_naptime15sTime to sleep between autovacuum runs. 
    autovacuum_vacuum_cost_delay10msVacuum cost delay in milliseconds, for autovacuum. 
    autovacuum_vacuum_cost_limit1000Vacuum cost amount available before napping, for autovacuum. 
    autovacuum_vacuum_scale_factor0.1Number of tuple updates or deletes prior to vacuum as a fraction of reltuples. 
    autovacuum_vacuum_threshold25Minimum number of tuple updates or deletes prior to vacuum. 

    We recommend set the archive_mode parameter to off, using the pg_dump command instead.

    Backup and restore

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

    To restore a backup, use the pg_restore command:

    Next steps

    Installing BellaDati on Linux - continue  Installing BellaDati on Linux, step "check that default ports"


    Installing BellaDati WAR

    continue installing the BellaDati.war application on your application server as described in:


    • No labels