pgpro_controldata

pgpro_controldata — вывести управляющую информацию кластера БД PostgreSQL/Postgres Pro Shardman и параметры совместимости кластера и/или сервера

Синтаксис

pgpro_controldata [параметр...]

Описание #

pgpro_controldata выводит управляющую информацию, в частности, версию каталога, записываемую программой initdb при инициализации любого кластера PostgreSQL/Postgres Pro Shardman. Данная утилита также выводит сведения о журнале предзаписи, включая данные контрольной точки. Эта информация относится ко всему кластеру, а не к отдельной базе данных.

pgpro_controldata также помогает проверить совместимость между серверами и кластерами БД PostgreSQL/Postgres Pro Shardman. Эта программа может вывести параметры, влияющие на совместимость, и определить, совместим ли сервер с кластером, сравнивая эти параметры.

pgpro_controldata поставляется вместе с Postgres Pro Shardman в виде отдельного пакета pgpro-controldata (подробные инструкции по установке приведены в Главе 16).

Параметры #

pgpro_controldata принимает в командной строке параметры, описанные далее. В случае запуска без параметров pgpro_controldata просто выводит управляющую информацию так. Заметьте, что аргументы командной строки, связанные с совместимостью, -P и -S, работают в паре как один аргумент -C.

Параметры общего назначения #

-B
--bindir

Задаёт каталог с исполняемыми файлами PostgreSQL/Postgres Pro Shardman; требуется для получения параметров совместимости сервера.

-D каталог_данных
--pgdata=каталог_данных

Указывает размещение конфигурационных файлов кластера. Если этот ключ опущен, используется значение переменной окружения PGDATA.

-V
--version

Показать версию pgpro_controldata, а затем завершиться.

-?
--help

Показать справку по аргументам командной строки pgpro_controldata, а затем завершиться.

Параметры, связанные с совместимостью #

-C
--compatibility-check

Вывести все параметры целевого кластера, от которых зависит совместимость выбранного сервера и кластера, и установить, совместимы ли они.

Путь к целевому каталогу данных, доступному для чтения, передаётся в аргументе -D или в переменной окружения PGDATA.

Если параметр -B опущен, подразумевается текущий сервер.

Эта проверка будет полноценной, только если данные кластера и сервер рассчитаны на одну архитектуру процессора и одинаковый порядок байтов.

-P
--cluster-compatibility-params

Вывести все параметры целевого кластера, которые могут повлиять на совместимость.

Путь к целевому каталогу данных, доступному для чтения, передаётся в аргументе -D или в переменной окружения PGDATA.

Эта проверка будет полноценной, только если данные кластера и сервер рассчитаны на одну архитектуру процессора и одинаковый порядок байтов.

-S
--server-compatibility-params

Вывести все параметры указанного или текущего сервера, которые могут повлиять на совместимость.

Если параметр -B опущен, подразумевается текущий сервер.

Переменные окружения

PGDATA

Каталог размещения данных кластера по умолчанию

PG_COLOR

Выбирает вариант использования цвета в диагностических сообщениях. Возможные значения: always (всегда), auto (автоматически) и never (никогда).

pgpro_controldata

pgpro_controldata — display control information of a PostgreSQL/Postgres Pro Shardman database cluster and compatibility information for a cluster and/or server

Synopsis

pgpro_controldata [option...]

Description #

pgpro_controldata prints control information, such as the catalog version, initialized by initdb command of any PostgreSQL/Postgres Pro Shardman server. It also shows information about write-ahead logging and checkpoint processing. This information is cluster-wide and not specific to any database.

pgpro_controldata also helps to check compatibility between PostgreSQL/Postgres Pro Shardman database servers and clusters. It can print server or cluster parameters that can affect the compatibility and check whether a cluster and server are compatible by comparing those parameters.

pgpro_controldata is provided with Postgres Pro Shardman as a separate pre-built package pgpro-controldata (for the detailed installation instructions, see Chapter 16).

Options #

pgpro_controldata accepts the following command-line arguments. If no arguments are specified, pgpro_controldata just prints the control information. Note that compatibility-related command-line arguments -P and -S specified together work the same way as -C.

General-Purpose #

-B
--bindir

Specifies the PostgreSQL/Postgres Pro Shardman executable directory, needed to get server compatibility parameters.

-D datadir
--pgdata=datadir

Specifies the file system location of the database configuration files. If this option is omitted, the environment variable PGDATA is used.

-V
--version

Print the pgpro_controldata version, then exit.

-?
--help

Show help about pgpro_controldata command-line arguments, then exit.

Compatibility-Related #

-C
--compatibility-check

Display all parameters that can affect compatibility between the specified server and cluster and check whether they are compatible.

Use the -D option or the environment variable PGDATA to provide the path to the data directory, where read access is required.

If the -B option is omitted, the current server is assumed.

The cluster data and the server must have the same byte order and architecture type for this option to work correctly.

-P
--cluster-compatibility-params

Display all parameters of the specified cluster that can affect the compatibility.

Use the -D option or the environment variable PGDATA to provide the path to the data directory, where read access is required.

The cluster data and the server must have the same byte order and architecture type for this option to work correctly.

-S
--server-compatibility-params

Display all parameters of the specified or current server that can affect the compatibility.

If the -B option is omitted, the current server is assumed.

Environment

PGDATA

Default data directory location

PG_COLOR

Specifies whether to use color in diagnostic messages. Possible values are always, auto and never.

FAQ