We are in the process of adding support for PostgreSQL to WACS and hope it will be part of the Wacs 1.0.0 release. Please check the release notes for the up-to-date position of this support, but we are hoping it will prove fully functional. Some of the customisation available with other databases may not be available.
Note | |
---|---|
We have created a wacs-for-psql package for
both Fedora and Ubuntu that attempts do to what is necessary to create a
working Wacs installation. To this end, we create the basic database and
a special |
PostgreSQL is rather different from Oracle and MySQL as it tends towards
using the host operating system authentication mechanisms for identifying users
rather than a more conventional username and password combination.
It can be reconfigured to allow username and password login, and we attempt
to do this in as minimalist a way as possible to preserve normal operation
for other users of the database. By default, the system manager account,
postgres
gains automatic database manager authority when
it invokes any of the postgres tools (like the SQL command line,
psql).
Warning | |
---|---|
NB: some Linux distributions, eg Ubuntu, support simultaneous
installation of multiple versions of Postgresql. In this case, you may find
that the TCP/IP port number on which the database listens has changed from
the default of 5432. In one case on an Ubuntu Xenial system which had been
upgraded from previous releases; PostgreSQL 9.1 had port 5432, PostgreSQL 9.3
had port 5433 and PostgreSQL 9.5 had 5434. All of these are configured in
/etc/postgres/<release_no>/main/postgresql.conf so do
check the port = directive to make sure you are connecting
to the version of the database you think you are. |
A key point to understand is that the Perl DBD driver and similar interfaces to PostgreSQL use the network domain rather than the named pipe for communication and this is not by default enabled by the installation packages for PostgreSQL. In the next section, we will take you through the setup and configuration steps needed for PostgreSQL to interact with the network properly.
There are three steps you need to take to enable network-based operation in postgres; to do these as described belowe you will need access to either the postgres or root accounts for the server computer. If you do not have access to this, there may be other ways to do what is needed via cPanel or similar but you will have to consult a suitable administrator for the system you are using.
To use WACS effectively the database is all managed under a dedicated
WACS user account and it is thus easier to provide username and password
without the normal host-based user authentication taking place. If you
wish to use the interactive PostgreSQL command line interpreter,
psql for fixing up issues or making ad hoc database queries, it
is best to use the -h
option with the host name of the
database service. You will also need the -U
option to
specify the username to use, and maybe -W
to force
interactive prompts for the password (optional). A sample invocation of
the psql SQL command line would therefore be:
psql -d wacs -h myserver -U wacs