16.1. Installing Postgres Pro Standard on Linux

For Linux-based operating systems, Postgres Pro Standard is shipped as binary packages. Each Postgres Pro binary distribution consists of several packages, similar to native packaging of the PostgreSQL for these operating systems.

Splitting the distribution into several packages enables customizing the installation for different purposes: you can install Postgres Pro on database servers, client workstations, developer workstations for developing client applications, and so on. All Postgres Pro distributions include separate documentation packages in English and in Russian.

Depending on your target OS distribution, the available packages and installation specifics may differ. For more information, select your target OS family:

Regardless of the target OS, when initializing the cluster, make sure to specify all the parameters that are required for your environment. All the available initialization options are described in initdb documentation. In particular, note the following default settings you may want to override for your database cluster:

  • By default, when you initialize the cluster by running initdb, the trust authentication method is used for all connections, which is not recommended on production systems. For details on various authentication methods available, see Section 19.3.

  • The locale to be used is inherited from your system environment, which in turn affects the encoding, collation, and text search configuration that will be used for your cluster.

16.1.1. Installation on CentOS and Red Hat Enterprise Linux Systems

16.1.1.1. Choosing the Packages to Install

For Red Hat Enterprise Linux and its derivatives, such as CentOS, Oracle Linux, and Rosa Enterprise Linux Server, Postgres Pro distribution is split into the following packages:

Package Description
postgrespro96 Standard client applications such as psql, pg_dump, and so on
postgrespro96-libs Shared libraries, required to deploy client applications
postgrespro96-serverPostgres Pro server and PL/pgSQL server-side programming language
postgrespro96-contrib Additional extensions and programs deployable on database servers
pg-probackup-std-9.6pg_probackup utility
postgrespro96-pg_probackuppg_probackup package for automatic upgrades from Postgres Pro Standard 9.6.11.1 or lower
pg_repack Table reorganization utility
postgrespro96-devel Development headers and libraries both for development of client applications and server extensions
postgrespro96-plperl Server-side programming language based on Perl
postgrespro96-plpython Server-side programming language based on Python
postgrespro96-pltcl Server-side programming language based on Tcl
postgrespro96-docs Documentation (English)
postgrespro96-docs-ru Documentation (Russian)
postgrespro96-test Test scripts for the server

pgpro-controldata

pgpro_controldata application to display control information of a PostgreSQL/Postgres Pro database cluster and compatibility information for a cluster and/or server.

For server installations, install at least the following packages:

  • postgrespro96-server

  • postgrespro96

  • postgrespro96-libs

To use additional Postgres Pro extensions, you must also install the postgrespro96-contrib package.

By default, all files are installed into the /usr/pgpro-9.6 directory. Make sure /usr/pgpro-9.6/bin is added to your PATH environment variable.

16.1.1.2. Creating the Default Database

Installation of the postgrespro96-server package does not create the default database. It only creates the postgres system user that owns database files and server processes.

To create the default database, run the helper script pg-setup as root:

/usr/pgpro-9.6/bin/pg-setup initdb

In this case, the peer authentication method will be used for all local connections, while the ident method will be used for all network connections. For details on available authentication methods, see Section 19.3.

16.1.1.3. Installing Multiple Postgres Pro Instances

To run several instances of Postgres Pro server with different data directories, create a copy or a symlink of /etc/init.d/postgresql with a different name, create the corresponding /etc/sysconfig files and symlinks in runlevel directories.

If required, you can install vanilla PostgreSQL, Postgres Pro, and Postgres Pro Enterprise on the same system simultaneously.

The name of sysconfig file read by init.d script is derived from its own name.

16.1.2. Installation on Debian-Based Operating Systems

16.1.2.1. Choosing the Packages to Install

For Debian-based operating systems (Debian, Ubuntu, Astra Linux), Postgres Pro is split into following packages:

Package Description
postgrespro-libecpg6 Runtime libraries for ECPG preprocessor
postgrespro-libecpg-compat3 Compatibility runtime for programs compiled with old ECPG
postgrespro-libecpg-dev ECPG preprocessor for embedded SQL
postgrespro-libpgtypes3 Runtime libpgtypes library for programs build with ECPG
postgrespro-libpq5 Runtime libraries for Postgres client programs
postgrespro-libpq-dev Development files for develop client programs
postgrespro-9.6Postgres Pro server
postgrespro-9.6-dbg Debug information for Postgres Pro server
postgrespro-client-9.6 Client programs for interaction with Postgres Pro server
postgrespro-common-9.6 Tools for managing multiple server instances
postgrespro-client-common-9.6 Tools for choosing between different versions of client programs installed on one system
postgrespro-contrib-9.6 Additional modules and extensions
postgrespro-doc-9.6 Documentation (English)
postgrespro-doc-ru-9.6 Documentation (Russian)
pg-probackup-std-9.6pg_probackup utility
postgrespro-pg-probackup-9.6pg_probackup package for automatic upgrades from Postgres Pro Standard 9.6.11.1 or lower
postgrespro-plperl-9.6 Server-side PL/Perl language
postgrespro-plpython3-9.6 Server-side PL/Python language based on Python 3
postgrespro-plpython-9.6 Server-side PL/Python language based on Python 2
postgrespro-pltcl-9.6 Server-side PL/Tcl language
postgrespro-server-dev-9.6 Development files to compile server extensions using PGXS framework

pgpro-controldata

pgpro_controldata application to display control information of a PostgreSQL/Postgres Pro database cluster and compatibility information for a cluster and/or server.

Server installations require postgrespro-9.6 package (which depends on postgrespro-contrib-9.6). Other server-related packages, such as the ones for PL languages or pg_probackup, are optional.

Client installations need only postgrespro-libpq5 and postgrespro-client-9.6 packages. If you use custom applications and do not need standard clients such as psql, you can install the postgrespro-libpq5 package only.

Development files on Debian are split into the following packages:

  • postgrespro-libpq-dev — development package for compiling client programs.

  • postgrespro-libecpg-dev — development package for programs that use ECPG Embedded SQL preprocessor.

  • postgrespro-server-dev-9.6 — development package for compiling server extensions.

16.1.2.2. Creating the Default Database

Debian database server packages create the default database at the moment of server installation, and allow to create additional ones, called clusters using pg_createcluster script. All these clusters are managed using system service management facilities (SysVinit in older distributions, systemd in newer ones).

pg_createcluster also allows to import existing databases into Debian-specific service management system. It tries to automatically enable SSL on the newly created cluster, but can do so only if the postgres user is a member of ssl-cert group and there is valid certificate in /etc/ssl/certs.

Postgres Pro distribution for Debian-based systems uses a non-standard directory layout for the database cluster. By default, Postgres Pro keeps configuration files and data in the same directory. However, Debian policy requires configuration files to be stored under /etc. Thus, on Debian-based systems, the PGDATA parameter always points to a subdirectory under /etc, where only postgresql.conf, pg_hba.conf and a few other configuration files are stored. The actual location of data is determined by the data_directory option in postgresql.conf.

16.1.2.3. Installing Multiple Postgres Pro Instances

The postgrespro-common and postgrespro-client-common packages provide a complex infrastructure that allows running several versions of PostgreSQL, Postgres Pro and Postgres Pro Enterprise servers simultaneously, thus enabling smooth database upgrades.

For more information about Debian-specific infrastructure, see the following manual pages: pg_createcluster(8), pg_ctlcluster(8), pg_conftool(1), postgresql-common(5), postgresqlrc(5) and user_clusters(5).

Debian provides the script pg_wrapper(1) to invoke client binaries for correct version of your PostgreSQL-based product. It is linked as /usr/bin/psql, /usr/bin/pg_dump, etc. If several PostgreSQL-based products are installed, it invokes the most recent binaries unless explicitly configured to do the opposite.

Note

Debian packaging of Postgres Pro programs contains two copies of the pg_config utility, one in the libpq-dev package and the other in postgrespro-server-dev-9.6 package. It is because both client programs and server extensions use this utility to determine location of Postgres development files. So, if you are planning to develop both client applications and server extensions on same system, make sure that you have installed libpq-dev and postgrespro-server-dev-X.X from same Postgres product.

16.1.3. Installation on ALT Linux

16.1.3.1. Choosing the Packages to Install

For ALT Linux, Postgres Pro is split into the following packages:

Package Description
libecpg6.8 Runtime libraries for programs using ECPG
libecpg6.8-devel ECPG embedded SQL preprocessor
libecpg6.8-devel-static Static libraries for ECPG
libpq5.9 Client library libpq
libpq5.9-devel Development files for libpq
libpq5.9-devel-static Static libraries for compiling client programs
postgrespro9.6 Standard client programs, such as psql, and man pages for SQL commands
postgrespro9.6-contrib Extensions loadable into Postgres Pro server
postgrespro9.6-devel Files to compile server extensions using PGXS framework
postgrespro9.6-devel-static Static libraries needed to compile extensions
postgrespro9.6-docs Documentation (English)
postgrespro9.6-docs-ru Documentation (Russian)
postgrespro9.6-perl PL/Perl programming language
pg-probackup-std-9.6pg_probackup utility
postgrespro9.6-pg_probackuppg_probackup package for automatic upgrades from Postgres Pro Standard 9.6.11.1 or lower
postgrespro9.6-python PL/Python programming language
postgrespro9.6-server Postgres Pro Enterprise server
postgrespro9.6-tcl PL/Tcl programming language

pgpro-controldata

pgpro_controldata application to display control information of a PostgreSQL/Postgres Pro database cluster and compatibility information for a cluster and/or server.

All packages containing binary files have the corresponding -debuginfo packages.

For server installations, you need postgrespro-9.6-server. For a minimal client installation, only the libpq5.9 package is required. postgrespro-9.6 is typically needed on clients.

pg_config utility is only shipped as part of postgrespro-9.6-devel package, so you need to install this package if you are going to compile client programs that use pg_config in the build process.

16.1.3.2. Installing Multiple Postgres Pro Instances

On ALT Linux, you can only have a single PostgreSQL installation on your system at a time. If you are installing a newer version over the old one, new binaries replace the old ones. To perform database upgrade using pg_upgrade utility, you need both new and old postgres executable files. So, pre-installation script copies the existing postgres binary and libpq shared library into /usr/lib64/pgsql/9.6/backup. Use this directory name as an argument of the pg_upgrade -b option.

16.1.4. Installation on the SUSE Linux

16.1.4.1. Choosing the Packages to Install

For SUSE systems, Postgres Pro is split into following packages:

Package Description
libecpg6 Runtime libraries for programs using ECPG
libpq5 Runtime libraries for Postgres client programs
postgrespro96 Standard client programs, such as psql, and man pages for SQL commands
postgrespro96-contrib Loadable modules and extensions for server
postgrespro96-devel Development files for both client programs and server extensions
postgrespro96-docs Documentation (English)
postgrespro96-docs-ru Documentation (Russian)
pg-probackup-std-9.6pg_probackup utility
postgrespro96-pg_probackuppg_probackup package for automatic upgrades from Postgres Pro Standard 9.6.11.1 or lower
postgrespro96-plperl PL/Perl programming language
postgrespro96-plpython PL/Python programming language
postgrespro96-pltcl PL/Tcl programming language
postgrespro96-serverPostgres Pro server
postgrespro96-test Regression test suite for Postgres Pro server

pgpro-controldata

pgpro_controldata application to display control information of a PostgreSQL/Postgres Pro database cluster and compatibility information for a cluster and/or server.

Server installations require postgrespro96-server, postgrespro96, and postgrespro96-libs packages. To use additional Postgres Pro extensions, you must also install the postgrespro96-contrib package.

16.1.4.2. Creating the Default Database

To start Postgres Pro server after installation of the server package, run the following command as root:

service postgresql start

The default database in SUSE is created upon the first start of service. You can customize its location, locale, and other parameters in /etc/sysconfig/postgrespro.

16.1.4.3. Installing Multiple Postgres Pro Instances

On SUSE systems, you cannot install several versions of client programs simultaneously.

16.1.5. Antivirus Considerations

It is strongly recommended to avoid using antivirus software on systems where Postgres Pro is running because it may cause additional load on your environment and result in unexpected database behavior that would lead to performance and reliability issues. If you need to use antivirus software, make sure to exclude the following directories from virus scanning as they do not contain any executable files:

  • PGDATA directory that stores main cluster data

  • Paths to created tablespaces