Chapter 82. PostgreSQL Database Use

Table of Contents

PostgreSQL Database Preparation
Server Configuration

Artur Hefczyc <> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: :Date: 2010-04-06 21:16

This guide describes how to configure Tigase server to use PostgreSQL database as user repository.

If you used XML based user repository before you can copy all user data to PostgreSQL database using repository management tool. All steps are described below.

PostgreSQL Database Preparation

Create new database user account which will be used to connect to your database:

# createuser
Enter name of user to add: tigase
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y

Now using new database user account create database for your service:

# createdb -U tigase tigasedb

Now you can load database schema:

# psql -U tigase -d tigasedb -f postgresql-schema.sql

Now database is ready for Tigase server to use it.