Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
16.1. InstallingPostgres Pro Standard
Prev UpChapter 16. Binary InstallationHome Next

16.1. InstallingPostgres Pro Standard#

Postgres Pro only runs on Linux-based operating systems, and it is shipped as binary packages. EachPostgres Pro binary distribution consists of several packages. The package structure differs from vanillaPostgreSQL and offers the following installation modes:

  • Quick installation and setup. Thepostgrespro-std-17 package installs and configures all the components required for a viable ready-to-use configuration of both server and client components. Choose this option if you are going to install a singlePostgres Pro instance only, and you are not worried about possible conflicts with otherPostgreSQL-based products.

    Important

    Installing thepostgrespro-std-17 package can delete existing installations ofPostgres Pro andPostgreSQL-based products. Similarly, thisPostgres Pro installation may be automatically removed if you later install anotherPostgreSQL-based product. Do not use this package for upgrades or migrations, or if you are going to maintain several installations on the same system.

  • Custom installation. You can select any packages required for your purposes, including development packages. This option needs manual configuration, so a good grasp of Linux and understanding ofPostgreSQL architecture are required. This is the only option to choose if you are going to usePostgres Pro in one of the following scenarios:

    • Install severalPostgres Pro versions side by side, or together with other PostgreSQL-based products.

    • Perform an upgrade from a previous version, or migrate from a differentPostgreSQL-based product.

    • ControlPostgres Pro server execution using high availability software, such aspacemaker, instead of the standard system service management facility.

The minimum hardware required to installPostgres Pro, create a database cluster and start the database server are as follows:

  • 1-GHz processor

  • 1 GB of RAM

  • 1 GB of disk space

Additional disk space is required for data or supporting components.

16.1.1. Supported Linux Distributions#

Note

This is the lastPostgres Pro release that supports Ubuntu 20.04. Starting from the next release, this operating system will no longer be supported.

Note

The nextPostgres Pro release will be the last to support Ubuntu 24.10.

Postgres Pro binary packages are available for the following Linux-based systems:

  • Red Hat Enterprise Linux (RHEL) systems and its derivatives: CentOS 8, Rocky Linux 8/9, Red Hat Enterprise Linux 8/9, Oracle Linux 8/9, ROSA Chrome 2021.2, Red OS Murom 7.3/8, AlmaLinux 9

  • Debian-based systems: Debian 11/12, Ubuntu 20.04/22.04/24.04/24.10/25.04, Astra Linux 1.7/1.8/3.8

  • ALT 10/11, ALT SP Release 10

  • SUSE Linux Enterprise Server (SLES) 15

  • MosOS 15

  • Linux systems for Elbrus CPU architecture: ALT 9/10 for e2kv3/e2kv4, ALT 8.2 SP for e2kv3/e2kv4, ALT SP Release 10, Astra Linux Leningrad 8.1

  • Linux systems for ARM architecture: ALT 9/10/11, ALT SP 8.2 and higher, Astra Linux Novorossiysk, Debian 10/11, Red OS Murom 7.3/8, RHEL 8/9, Ubuntu 20.04/22.04/24.04

Note

Postgres Pro binary packages rely on thetzdata library provided by the operating system, so you must ensure that the latest available version is installed. Iftzdata is outdated, the time in your database may be incorrect.

16.1.2. Adding Package Repository#

Before installingPostgres Pro from binary packages using the package manager of your operating system, you need to add thePostgres Pro package repository.

To add the repository, complete the following steps:

  1. Contact thePostgres Pro Standard support team to download thepgpro-repo-add.sh Bash script. The support team will also provide you with the credentials to access the repository.

    This script adds the repository so that the package manager of your operating system can use it.

  2. Make sure that thewget utility is installed and can access the Internet.

    The script requireswget and the Internet access to check the validity of the credentials when adding the repository.

    Note

    It is not possible to use a SOCKS5 proxy for accessing the Internet aswget does not support this type of proxy.

  3. (Optional) Examine the content of the script, if necessary.

  4. Run the script asroot (e. g. usingsudo).

  5. When prompted, enter the access credentials.

    Important

    If no credentials are provided or they are invalid, the script will offer to add the repository without credentials.

    If you proceed without credentials, you will be required to manually provide the credentials later in order to access the repository.

Now you are ready to installPostgres Pro Standard using the package manager of your operating system.

16.1.3. Quick Installation and Setup#

If you only need to install a singlePostgres Pro instance and are not going to use any otherPostgreSQL-based products on your system, you can use the quick installation mode. The typical process is as follows:

  1. Add the package repository required for your operating system.

  2. Install thepostgrespro-std-17 package. It will bring all the required components via dependencies, create the default database, start the database server, as well as enable server autostart at system boot and make all the provided programs available inPATH.

Note

By default, the database configuration is set for thePostgres Pro product being installed. If you need your database configured for a different product, choosecustom installation and use thetune argument of thepg-setup initdb command.

Once the installation completes, you can launchpsql on behalf of thepostgres user and connect to the newly created database, which is located in the/var/lib/pgpro/std-17/data directory.

Since the default database is created using thepg-setup script, the path to its data directory is stored in the/etc/default/postgrespro-std-17 file. All the subsequentpg-setup commands, as well as any commands that managePostgres Pro service, affect this database only. In this file, you can also change the value ofPG_OOM_ADJUST_VALUE for postmaster child processes (seeSection 17.4.4 for details).

16.1.4. Custom Installation#

Splitting the distribution into multiple packages enables customizing the installation for different purposes: database servers, client systems, or development workstations. Custom installations need to be configured manually, but give you more flexibility in using the product. You can install severalPostgres Pro versions side by side, as well as together with otherPostgreSQL-based products. In particular, this may be required when performing upgrades, or migrating from a differentPostgreSQL-based product.

To perform a custom installation, complete the following steps:

  1. Add the package repository required for your operating system.

  2. ChoosePostgres Pro packages required for your purposes and install them using the standard installation commands for your Linux distribution. The available packages are listed inTable 16.1.

    As a result, all files get installed into the/opt/pgpro/std-17 directory.

  3. Runpg-wrapper as root to make the installed client and server programs available viaPATH and addSQL man pages to the man page configuration file. This utility is provided in thepostgrespro-std-17-client package.

    /opt/pgpro/std-17/bin/pg-wrapper links update

    For details on how to handle possible conflicts, seepg-wrapper description.

  4. If you chose to install thepostgrespro-std-17-server package, make sure to complete the following server setup:

    1. Create the default database by running the helper scriptpg-setup as root with theinitdb option:

      /opt/pgpro/std-17/bin/pg-setup initdb [--tune=conf] [initdb_options]

      where:

      • thetune command-line argument sets the database configuration.

      • initdb_options are regularinitdb options.

      Note

      By default,pg-setup initializes the database cluster with checksums enabled. If this is not what you expect, specify the--no-data-checksums.

      Thepg-setup script performs database administration operations as userpostgres. If you do not specify anyinitdb options, the default database is created in the/var/lib/pgpro/std-17/data directory, using localization settings specified in theLANG environment variable for the current session. All theLC_* environment variables are ignored.

      Since the default database is created using thepg-setup script, the path to its data directory is stored in the/etc/default/postgrespro-std-17 file. All the subsequentpg-setup commands, as well as any commands that managePostgres Pro service, affect this database only. In this file, you can also change the value ofPG_OOM_ADJUST_VALUE for postmaster child processes (seeSection 17.4.4 for details).

    2. Start the server by runningpg-setup as root, as follows:

      /opt/pgpro/std-17/bin/pg-setup service start

      Like vanillaPostgreSQL,Postgres Pro server runs on behalf of thepostgres user.

      Note

      By default, automatic server startup is disabled, so you can manually control the database recovery after a system reboot. Optionally, you can configure thePostgres Pro server to start automatically. For details, seeSection 16.1.4.2.

16.1.4.1. Choosing the Packages to Install#

The table below lists all the availablePostgres Pro Standard packages.

Table 16.1. Postgres Pro Standard Packages

Package

Description

postgrespro-std-17

Top-level package that installs and configuresPostgres Pro for server and client systems. Do not use this package for upgrades or migrations.

Important

Installing thepostgrespro-std-17 package can delete existing installations ofPostgres Pro andPostgreSQL-based products. Similarly, thisPostgres Pro installation may be automatically removed if you later install anotherPostgreSQL-based product.

postgrespro-std-17-client

Standard client applications, such aspsql orpg_dump.

postgrespro-std-17-libs

Shared libraries required to deploy client applications, includinglibpq; runtime libraries for ECPG processor.

postgrespro-std-17-server

Postgres Pro server and PL/pgSQL server-side programming language.

postgrespro-std-17-contrib

Additional extensions and programs deployable on database servers.

postgrespro-std-17-devel

Header files and libraries for developing client applications and server extensions.

On Debian-based systems, this package is calledpostgrespro-std-17-dev.

postgrespro-std-17-plperl

Server-side programming language based on Perl (seeChapter 43).

postgrespro-std-17-plpython3

Server-side programming language based on Python 3 (seeChapter 44).

postgrespro-std-17-pltcl

Server-side programming language based on Tcl (seeChapter 42).

postgrespro-std-17-docs

Documentation (English).

postgrespro-std-17-docs-ru

Documentation (Russian).

postgrespro-std-17-test

Test scripts for the server.

This package is only available on RHEL-based and SUSE systems.

postgrespro-std-17-jit

This package provides support for Just-in-Time (JIT) compilation.

This package is available only for x86_64 architecture and only for the supported Debian and Ubuntu systems, Astra Linux 1.7/1.8, supported ALT systems, CentOS 8, Rocky Linux 8/9, Oracle Linux 8/9, AlmaLinux 9, SLES 15 and RHEL 8/9.

To learn more about enabling and using JIT, seeChapter 29.

mamonsu

mamonsu — a monitoring agent for collecting Postgres Pro and system metrics.

pg-portal-modify-std-17

An extension to modify Postgres Pro cursors.

pg-probackup-std-17

pg_probackup utility.

pgpro-controldata

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

pgpro-pwr-std-17

pgpro_pwr extension that enables you to generate workload reports, which help to discover most resource-intensive activities in your database.

pgpro-stats-std-17

pgpro_stats extension that tracks execution statistics of SQL statements, calculates wait event statistics and provides other useful metrics.


Also, Postgres Pro includes libraries and utilities required for the Postgres Pro server and provided packages. These packages are only provided for the distributions that don't include the required versions of these libraries.

Table 16.2. Third-party libraries and utilities forPostgres Pro Standard

Library/utility

Description

liblz4

A library for fast lossless data compression.

freetds

A library that implements TDS protocol. It is used by thetds-fdw extensiion. It includesfreetds-devel,freetds-doc andfreetds-libs. This package is available only for RHEL 8/9.

libunwind

A stack unwinding library used bycrash_info. This package is provided for RHEL 8.

libbacktrace

A backtrace library used bycrash_info. This package is provided for Red OS 7.3/8 and RHEL 8/9.

libsybdb5

A library that implements TDS protocol. This package is provided for SLES 15.

perl-IO-Tty, perl-IPC-Run

Two Perl libraries used in the TAP test framework available in thepostgrespro-std-17-devel package for extension developers and engineers.perl-IO-Tty is provided for RED OS Murom 7.3/8, RHEL 8/9, andperl-IPC-Run is provided for RED OS Murom 7.3/8, RHEL 8/9, SLES 15.


Besides, there are separate packages providing several external modules that have been pre-built for compatibility with Postgres Pro Standard:

Table 16.3. Third-party Packages Built forPostgres Pro Standard

Package

Description

hypopg-std-17

hypopg extension, which provides support for hypothetical indexes inPostgres Pro.

odbc-postgrespro-std-17

An Open Database Connectivity (ODBC) driver for accessing database management systems (DBMS).odbc-postgresql can be used instead, yet in some cases it may conflict with the outdated libraries of the vanillaPostgreSQL that do not provide functionality available in newer libraries.

oracle-fdw-std-17

oracle_fdw extension that provides a foreign data wrapper for Oracle.

This package is only available for the supported Intel-based operating systems.

orafce-std-17

This package implements in Postgres Pro some of the functions from the Oracle database that are missing (or behaving differently).

pg-filedump-std-17

pg_filedump utility to format Postgres Pro heap/index/control files into a human-readable form.

pg-repack-std-17

pg_repack extension and utility for reorganizing tables.

pgbouncer

pgbouncer — a connection pooler for Postgres Pro.

pgpro-pgbadger

pgbadger — Postgres Pro log analyzer that provides detailed reports and graphs.

pgvector-std-17

pgvector extension that provides vector similarity search forPostgres Pro.

pldebugger-std-17

A set of shared libraries that implement an API for debugging PL/pgSQL functions in Postgres Pro.

plv8-std-17

The shared library PLV8 that provides a Postgres Pro procedural language powered by V8 Javascript Engine.

This package is only available for the supported Debian and Ubuntu systems, ALT 10/11, SLES 15, RHEL 8/9, and Red OS Murom 7.3.

tds-fdw-std-17

tds_fdw extension that provides a foreign data wrapper to connect to Microsoft SQL Server and other databases that use the Tabular Data Stream (TDS) protocol.


Additionally,Postgres Pro provides separate packages with debug information for some operating systems:

  • On Debian-based systems, see thepostgrespro-std-17-dbg package.

  • On RHEL-based systems, see thepostgrespro-std-17-debuginfo package.

  • On ALT Linux systems, all packages containing binary files have the corresponding-debuginfo packages.

Server installations require at least the following packages:

  • postgrespro-std-17-server

  • postgrespro-std-17-client

  • postgrespro-std-17-libs

To use additionalPostgres Pro extensions, you must also install thepostgrespro-std-17-contrib package. On Debian-based systems,postgrespro-std-17-server package depends onpostgrespro-std-17-contrib package, so the latter must always be installed together with the server.

For client installations, it is usually enough to install thepostgrespro-std-17-client andpostgrespro-std-17-libs packages. If you use custom applications and do not need standard client utilities such aspsql, you can install thepostgrespro-std-17-libs package only.

Development workstations require at least the following packages:

  • postgrespro-std-17-libs

  • postgrespro-std-17-devel/postgrespro-std-17-dev

You may also want to install and configure the server with a test database on development systems. For details on additional configuration that may be required,Section 16.1.5.

16.1.4.2. Enabling Automatic Server Startup#

If you are running a custom installation, automatic server startup is disabled by default. Once the default database is created, you can configure the server to start automatically upon system boot using service management solutions available in your operating system or third-party high-availability software. To facilitate this task,postgrespro-std-17-server package provides thepg-setup script, which is installed in the/opt/pgpro/std-17/bin directory.

To enable server autostart, run thepg-setup script with the following options:

pg-setup service enable

If required, you can disable server autostart using the same script:

pg-setup service disable

Alternatively, you can use system service management solutions directly by running the autostart scripts for SysV-styleinit.d andsystemd provided in thepostgrespro-std-17-server package. Depending on your Linux distribution,Postgres Pro supports different service management solutions:

Linux Distribution

Provided Scripts

RHEL-based systems, SLES 15

systemd unit file

Debian, Ubuntu, ALT 10/11

Bothsystemd unit file and SysV-styleinit.d script

To usesystemd for automatic server startup, run the following command:

systemctl enable postgrespro-std-17

To use SysV-styleinit.d script:

  • On ALT Linux systems, run the following command:

    systemctl enable postgrespro-std-17

  • On Debian systems, useupdate-rc.d. See the correspondingman page for details.

16.1.5. Setting up Development Workstations#

While installingpostgrespro-std-17-libs andpostgrespro-std-17-devel/postgrespro-std-17-dev packages may be enough, it is usually convenient to have the server set up on the development system. For quick setup, you can installpostgrespro-std-17 package, which automatically configures the provided client and server programs and creates the default database. However, if you are going to use severalPostgreSQL-based products simultaneously, follow the custom installation instructions inSection 16.1.4.

To compile programs withPostgres Pro libraries using thepg_config utility shipped withPostgres Pro, make sure it appears before the path to otherpg_config versions, if any. Note that on RHEL-based systemspg_config is not added toPATH automatically. If you do not have any otherpg_config versions on your system, you can usepg-wrapper provided in thepostgrespro-std-17-client package to create a symbolic link topg_config in the standard binary directory.

To compile programs usingpkg-config command, add the/opt/pgpro/std-17/lib/pkgconfig/ path to thePKG_CONFIG_PATH environment variable.

If you would like to compilePostgres Pro extensions that supportJIT inlining, make sure to meet the following additional requirements:

  • Install LLVM development package and Clang compiler. You must choose the packages of the same version that was used for thepostgrespro-std-17-jit to be installed on the server. To determine the required version for the currentPostgres Pro release, check theCLANG value in the/opt/pgpro/std-17/lib/pgxs/src/Makefile.global file.

  • When runningmake ormake install commands, specify thewith-llvm=yes option to compile and install bitcode files for your extension. By default, bitcode compilation is disabled as it depends on Clang compiler availability.

16.1.5.1. Using Third-Party Programs withPostgres Pro#

To usePostgres Pro server with a client program provided with a third-party product, you can install the version ofPostgreSQL libraries that was used to compile this program. For example, if this program is provided with vanillaPostgreSQL, you may need to install thelibpq orpostgresql-libs packages available for your Linux distribution. In this case, the program may not be able to use some new features ofPostgres Pro server, but it is probably not designed to use them anyway.

If you prefer to usePostgres Pro libraries with a third-party program, or would like to enable support for a new feature that does not require client application change, such asSCRAM authentication, you can recompile your program withPostgres Pro libraries.

If you are creating.rpm or.deb packages for your program, it is recommended to do the following:

Thus, you can ensure that your package build process calls the right version ofpg_config whenever the source package is rebuilt.

To set up severalPostgres Pro server instances with different data directories on Linux, do the following:

  1. Install and configurePostgres Pro as explained inSection 16.1.3 orSection 16.1.4.

  2. Once the first default database is created, runinitdb specifying the path to a different data directory and any other parameters required to initialize another server instance.

  3. Specify different ports for your server instances in the correspondingpostgresql.conf files to avoid conflicts.

  4. If required, configure automatic server startup, as follows:

    1. Create a copy of/etc/init.d/postgrespro-std-17 or/lib/systemd/system/postgrespro-std-17.service with a different name, specifying the path to the data directory.

    2. Enable automatic server startup using the provided autostart scripts for your system service management facility instead ofpg-setup, as described inSection 16.1.4.2. Make sure to use the renamed copies of the scripts you created in step 1.

16.1.7. Antivirus Considerations#

It is strongly recommended to avoid using antivirus software on systems wherePostgres 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, usually located in/var/lib/pgpro/std-17/data unless you specified another directory ininitdb options

  • Paths to createdtablespaces


Prev Up Next
Chapter 16. Binary Installation Home 16.2. Installing Additional Supplied Modules
pdfepub
Go to Postgres Pro Standard 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp