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--bindirSpecifies the PostgreSQL/Postgres Pro Shardman executable directory, needed to get server compatibility parameters.
-Ddatadir--pgdata=datadirSpecifies the file system location of the database configuration files. If this option is omitted, the environment variable
PGDATAis used.-V--versionPrint the pgpro_controldata version, then exit.
-?--helpShow help about pgpro_controldata command-line arguments, then exit.
Compatibility-Related #
-C--compatibility-checkDisplay all parameters that can affect compatibility between the specified server and cluster and check whether they are compatible.
Use the
-Doption or the environment variablePGDATAto provide the path to the data directory, where read access is required.If the
-Boption 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-paramsDisplay all parameters of the specified cluster that can affect the compatibility.
Use the
-Doption or the environment variablePGDATAto 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-paramsDisplay all parameters of the specified or current server that can affect the compatibility.
If the
-Boption is omitted, the current server is assumed.
Environment
PGDATADefault data directory location
PG_COLORSpecifies whether to use color in diagnostic messages. Possible values are
always,autoandnever.