pg-wrapper

pg-wrapper — управлять символическими ссылками Postgres Pro

Синтаксис

pg-wrapper links { update | remove }

Описание

Программа pg-wrapper представляет собой скрипт оболочки, включённый в дистрибутив Postgres Pro и предназначенный для управления символическими ссылками на программы Postgres Pro и подключения страниц man по SQL в системах Linux. Так как Postgres Pro устанавливается в /opt/pgpro/ent-16, это необходимо, чтобы клиентские и серверные программы находились в стандартном системном пути (PATH), а также находились новые страницы man по SQL. Эти действия не производятся автоматически во время установки (исключение составляет пакет быстрой установки postgrespro-ent-16) во избежание возможных конфликтов с другими продуктами на базе PostgreSQL, которые могут уже быть установлены.

Скрипт pg-wrapper входит в состав пакета postgrespro-ent-16-client. Установив этот пакет, вы сможете найти pg-wrapper в каталоге каталог-инсталляции/bin, где каталог-инсталляции обозначает путь /opt/pgpro/ent-16.

Скрипт pg-wrapper должен запускать пользователь root.

Параметры

pg-wrapper принимает следующие аргументы командной строки:

links {update | remove}

Управление символическими ссылками Postgres Pro и страницами man по SQL:

  • update — создать или заменить символические ссылки для серверных или клиентских программ, распространяемых в составе Postgres Pro, а также подключить страницы man по SQL в файле конфигурации страниц man.

  • remove — удалить символические ссылки и поддержку страниц man по SQL для текущей версии Postgres Pro.

Замечания

Если вы устанавливаете Postgres Pro из пакета postgrespro-ent-16, pg-wrapper вызывается автоматически.

Если вы устанавливаете отдельные пакеты Postgres Pro, вы можете запустить этот скрипт вручную, чтобы создать символические ссылки на предоставляемые клиентские и серверные программы, а также подключить страницы man по SQL в файле конфигурации страниц man.

При параллельной установке с другими продуктами на базе PostgreSQL поведение pg-wrapper зависит от того, поддерживается ли механизм update-alternatives вашей системой и уже установленным продуктом на базе PostgreSQL:

  • Если поддерживается механизм update-alternatives, pg-wrapper добавляет символические ссылки на программы Postgres Pro в систему альтернатив, в соответствии с их приоритетом, а также подключает страницы man по SQL в файл конфигурации страницы man. Информацию об изменении приоритетов в системе альтернатив вы найдёте в руководстве man update-alternatives в вашей системе.

    Если в системе уже установлены страницы man по SQL от другого продукта, от новой инсталляции будут выводиться только новые страницы, а все совпадающие страницы man — от старой. Чтобы новая документация SQL выводилась для всех страниц, вам потребуется изменить системную конфигурацию, например, поменять значение MANPATH.

  • Если механизм update-alternatives не поддерживается, pg-wrapper изменяет системную конфигурацию, только если отсутствуют конфликты с любыми другими установленными программами или страницами man. В случае таких конфликтов pg-wrapper не создаёт и не изменяет ссылки программ и пропускает интеграцию страниц man по SQL. В этом случае вы можете либо продолжать использовать ранее установленные версии программ и страниц man по SQL, либо изменить параметры PATH и MANPATH вручную.

Установка из двоичных пакетов в Linux подробно описана в Разделе 17.1.

pg-wrapper

pg-wrapper — manage Postgres Pro symbolic links

Synopsis

pg-wrapper links { update | remove }

Description

pg-wrapper is a shell script provided in the Postgres Pro distribution to manage Postgres Pro symbolic links for the provided programs and adjust the handling of SQL man pages on Linux systems. Since Postgres Pro is installed into /opt/pgpro/ent-16, this is required to make client and server programs available in the standard system PATH and find the new SQL man pages. This setup is not performed automatically at installation time to avoid possible conflicts with other PostgreSQL-based products you may have installed, unless you have opted for using the postgrespro-ent-16 quick-install package.

pg-wrapper is provided as part of the postgrespro-ent-16-client package. Once this package is installed, you can find pg-wrapper in the install-dir/bin directory, where install-dir is /opt/pgpro/ent-16.

pg-wrapper must be run as root.

Options

pg-wrapper accepts the following command-line arguments:

links {update | remove}

Manage Postgres Pro symbolic links and SQL man pages:

  • update — create or replace symbolic links for server and client programs provided with Postgres Pro, as well as add SQL man pages to the man page configuration file.

  • remove — remove symbolic links and SQL man page support for the current Postgres Pro version.

Notes

If you are installing Postgres Pro from the postgrespro-ent-16 package, pg-wrapper is invoked automatically.

If you are installing individual Postgres Pro packages, you can run this script manually to create symbolic links to the provided client and server programs, as well as add SQL man pages to the man page configuration file.

For parallel installations with other PostgreSQL-based products, pg-wrapper behavior depends on whether the update-alternatives utility is supported by your system and the already installed PostgreSQL-based product:

  • If update-alternatives is supported, pg-wrapper adds symbolic links to Postgres Pro programs into the alternative system, in accordance with their priority, as well as adds SQL man pages to the man page configuration file. For details on how to change the alternatives system priorities, see the man page for update-alternatives on your system.

    If SQL man pages are already installed from a different product, the pages unique for the new installation will be displayed, while the previous installation will keep its priority for all the coinciding man pages. For the new SQL documentation to be displayed for all pages, you have to modify the system configuration, for example, change the MANPATH value.

  • If update-alternatives is not supported, pg-wrapper updates the system configuration only if there are no conflicts with any programs or man pages already installed. Otherwise, pg-wrapper does not create or update any program links and skips SQL man page integration. In this case, you can either continue using the already available program versions and SQL man pages, or modify the PATH and MANPATH settings manually.

For details on binary installation specifics on Linux, see Section 17.1.

FAQ