18.16. Предопределённые параметры #
Следующие «параметры» доступны только для чтения. По этой причине они отсутствуют в примере файла postgresql.conf. Эти параметры отражают различные аспекты поведения Postgres Pro, которые могут быть полезны в определённых приложениях, например, клиентских средствах администрирования. Большинство из них задаётся при компиляции или при установке Postgres Pro.
block_size(integer) #Сообщает размер блока на диске. Он определяется значением
BLCKSZпри сборке сервера. Значение по умолчанию — 8192 байта. Значениеblock_sizeвлияет на некоторые другие переменные конфигурации (например, shared_buffers). Об этом говорится в Разделе 18.4.data_checksums(boolean) #Сообщает, включён ли в этом кластере контроль целостности данных. За дополнительными сведениями обратитесь к Контрольные суммы данных.
data_directory_mode(integer) #В Unix-системах этот параметр показывает разрешения (определённые data_directory), которые были установлены для каталога данных на момент запуска сервера. (В Microsoft Windows этот параметр всегда показывает
0700). За дополнительными сведениями обратитесь к Доступ группы.debug_assertions(boolean) #Сообщает, был ли Postgres Pro собран с проверочными утверждениями. Это имеет место, когда при сборке Postgres Pro определяется макрос
USE_ASSERT_CHECKING(например, при выполненииconfigureс флагом--enable-cassert). По умолчанию Postgres Pro собирается без проверочных утверждений.integer_datetimes(boolean) #Сообщает, был ли Postgres Pro собран с поддержкой даты и времени в 64-битных целых. Начиная с Postgres Pro версии 10, он всегда равен
on.in_hot_standby(boolean) #Сообщает, находится ли сервер в настоящий момент в режиме горячего резерва. Когда этот параметр имеет значение
on(вкл.), все транзакции ограничивается режимом «только чтение». В рамках сеанса это может измениться только в том случае, если сервер повышается до ведущего. За подробностями обратитесь к Разделу 25.4.lc_collate(string) #Сообщает локаль, по правилам которой выполняется сортировка текстовых данных. За дополнительными сведениями обратитесь к Разделу 22.1. Это значение определяется при создании базы данных.
lc_ctype(string) #Сообщает локаль, определяющую классификацию символов. За дополнительными сведениями обратитесь к Разделу 22.1. Это значение определяется при создании базы данных. Обычно оно не отличается от
lc_collate, но для некоторых приложений оно может быть определено по-другому.max_function_args(integer) #Сообщает верхний предел для числа аргументов функции. Он определяется константой
FUNC_MAX_ARGSпри сборке сервера. По умолчанию установлен предел в 100 аргументов.max_identifier_length(integer) #Сообщает максимальную длину идентификатора. Она определяется числом на 1 меньше, чем
NAMEDATALEN, при сборке сервера. По умолчанию константаNAMEDATALENравна 64; следовательноmax_identifier_lengthпо умолчанию равна 63 байтам, но число символов в многобайтной кодировке будет меньше.max_index_keys(integer) #Сообщает верхний предел для числа ключей индекса. Он определяется константой
INDEX_MAX_KEYSпри сборке сервера. По умолчанию установлен предел в 32 ключа.pgpro_build(string) #Сообщает идентификатор состояния исходного кода, из которого скомпилирован Postgres Pro.
pgpro_edition(string) #Показывает редакцию Postgres Pro в виде текстовой строки, например
standardилиenterprise.pgpro_version(string) #Показывает версию сервера Postgres Pro в виде текстовой строки.
segment_size(integer) #Сообщает, сколько блоков (страниц) можно сохранить в одном файловом сегменте. Это число определяется константой
RELSEG_SIZEпри сборке сервера. Максимальный размер сегмента в файлах равен произведениюsegment_sizeиblock_size; по умолчанию это 1 гигабайт.server_encoding(string) #Сообщает кодировку базы данных (набор символов). Она определяется при создании базы данных. Обычно клиентов должно интересовать только значение client_encoding.
server_version(string) #Сообщает номер версии сервера. Она определяется константой
PG_VERSIONпри сборке сервера.server_version_num(integer) #Сообщает номер версии сервера в виде целого числа. Она определяется константой
PG_VERSION_NUMпри сборке сервера.shared_memory_size(integer) #Сообщает размер основной области разделяемой памяти, округлённый до ближайшего мегабайта.
shared_memory_size_in_huge_pages(integer) #Сообщает количество огромных страниц, необходимых для основной области разделяемой памяти при заданном значении huge_page_size. Если огромные страницы не поддерживаются, выдаётся значение
-1.Этот параметр поддерживается только в Linux, а на других платформах всегда имеет значение
-1. За более подробной информацией об использовании огромных страниц в Linux обратитесь к Подразделу 17.4.5.ssl_library(string) #Сообщает имя библиотеки SSL, с которой был собран данный сервер Postgres Pro (даже если SSL для данного экземпляра не настроен или не используется), например,
OpenSSL, либо пустую строку, если сборка производилась без такой библиотеки.wal_block_size(integer) #Сообщает размер блока WAL на диске. Он определяется константой
XLOG_BLCKSZпри сборке сервера. Значение по умолчанию — 8192 байта.wal_segment_size(integer) #Сообщает размер сегментов журнала предзаписи. Значение по умолчанию — 16 МБ. За дополнительными сведениями обратитесь к Разделу 28.5.
18.16. Preset Options #
The following “parameters” are read-only. As such, they have been excluded from the sample postgresql.conf file. These options report various aspects of Postgres Pro behavior that might be of interest to certain applications, particularly administrative front-ends. Most of them are determined when Postgres Pro is compiled or when it is installed.
block_size(integer) #Reports the size of a disk block. It is determined by the value of
BLCKSZwhen building the server. The default value is 8192 bytes. The meaning of some configuration variables (such as shared_buffers) is influenced byblock_size. See Section 18.4 for information.data_checksums(boolean) #Reports whether data checksums are enabled for this cluster. See data checksums for more information.
data_directory_mode(integer) #On Unix systems this parameter reports the permissions the data directory (defined by data_directory) had at server startup. (On Microsoft Windows this parameter will always display
0700.) See group access for more information.debug_assertions(boolean) #Reports whether Postgres Pro has been built with assertions enabled. That is the case if the macro
USE_ASSERT_CHECKINGis defined when Postgres Pro is built (accomplished e.g., by theconfigureoption--enable-cassert). By default Postgres Pro is built without assertions.integer_datetimes(boolean) #Reports whether Postgres Pro was built with support for 64-bit-integer dates and times. As of Postgres Pro 10, this is always
on.in_hot_standby(boolean) #Reports whether the server is currently in hot standby mode. When this is
on, all transactions are forced to be read-only. Within a session, this can change only if the server is promoted to be primary. See Section 25.4 for more information.lc_collate(string) #Reports the locale in which sorting of textual data is done. See Section 22.1 for more information. This value is determined when a database is created.
lc_ctype(string) #Reports the locale that determines character classifications. See Section 22.1 for more information. This value is determined when a database is created. Ordinarily this will be the same as
lc_collate, but for special applications it might be set differently.max_function_args(integer) #Reports the maximum number of function arguments. It is determined by the value of
FUNC_MAX_ARGSwhen building the server. The default value is 100 arguments.max_identifier_length(integer) #Reports the maximum identifier length. It is determined as one less than the value of
NAMEDATALENwhen building the server. The default value ofNAMEDATALENis 64; therefore the defaultmax_identifier_lengthis 63 bytes, which can be less than 63 characters when using multibyte encodings.max_index_keys(integer) #Reports the maximum number of index keys. It is determined by the value of
INDEX_MAX_KEYSwhen building the server. The default value is 32 keys.pgpro_build(string) #Reports the commit ID of Postgres Pro source files.
pgpro_edition(string) #Reports the Postgres Pro edition as a string, i.e.
standardorenterprise.pgpro_version(string) #Reports the Postgres Pro server version as a string.
segment_size(integer) #Reports the number of blocks (pages) that can be stored within a file segment. It is determined by the value of
RELSEG_SIZEwhen building the server. The maximum size of a segment file in bytes is equal tosegment_sizemultiplied byblock_size; by default this is 1GB.server_encoding(string) #Reports the database encoding (character set). It is determined when the database is created. Ordinarily, clients need only be concerned with the value of client_encoding.
server_version(string) #Reports the version number of the server. It is determined by the value of
PG_VERSIONwhen building the server.server_version_num(integer) #Reports the version number of the server as an integer. It is determined by the value of
PG_VERSION_NUMwhen building the server.shared_memory_size(integer) #Reports the size of the main shared memory area, rounded up to the nearest megabyte.
shared_memory_size_in_huge_pages(integer) #Reports the number of huge pages that are needed for the main shared memory area based on the specified huge_page_size. If huge pages are not supported, this will be
-1.This setting is supported only on Linux. It is always set to
-1on other platforms. For more details about using huge pages on Linux, see Section 17.4.5.ssl_library(string) #Reports the name of the SSL library that this Postgres Pro server was built with (even if SSL is not currently configured or in use on this instance), for example
OpenSSL, or an empty string if none.wal_block_size(integer) #Reports the size of a WAL disk block. It is determined by the value of
XLOG_BLCKSZwhen building the server. The default value is 8192 bytes.wal_segment_size(integer) #Reports the size of write ahead log segments. The default value is 16MB. See Section 28.5 for more information.