Skip to Content.
Sympa Menu

Setup database: PostgreSQL

Requirements

General instruction

  1. Ensure that sympa.conf includes appropriate values for these parameters: db_type, db_name, db_host, db_port (optional), db_user and db_passwd (optional).

    • db_type must be PostgreSQL or Pg (obsoleted).

    • db_host may be host name or IP address of the database server with TCP connection (if db_port is not specified, 5432 is used as port), or directory of the Unix domain sockets (sockets must be writable by sympa group).

    Example:

    db_type PostgreSQL
    db_name sympa
    db_host localhost
    db_user sympa
    db_passwd (secret)
    
  2. Create database and role:

    $ psql
    postgres=# CREATE ROLE <db_user> NOSUPERUSER NOCREATEDB NOCREATEROLE
    postgres=# NOINHERIT LOGIN ENCRYPTED PASSWORD '<db_passwd>';
    postgres=# CREATE DATABASE sympa OWNER <db_user> ENCODING 'UNICODE';
    postgres=# \q
    
  3. Create table structure:

    # sympa.pl --health_check
    

Instruction for earlier releases of Sympa

Note

  • This section describes instruction with Sympa prior to 6.2.
  1. Set appropriate parameters in sympa.conf as described in above.

  2. Create database and role as described in above.

  3. Create table structure (Note: replace $SCRIPTDIR):

    $ psql -U <db_user> -d sympa < $SCRIPTDIR/create_db.Pg
    
Top of Page