Get live settings
Reads pg_settings in the database of the service on the leader (on a replica when the leader does not answer, with a note; in the postgres database when PostgreSQL refuses the database of the service, with a note), the pending restart of each member from Patroni, and SHOW CONFIG of PgBouncer on each PostgreSQL server. The HAProxy tunables come from the latest stored haproxy.cfg of each balancer, because HAProxy has no command that prints its configuration. The HBA rules of the user come from the store of the console. Each PostgreSQL row has its owner and, when a user cannot change it, the lock and its reason. A value with password= shows password=<redacted>. It is a fixed query, so a viewer can call it. It answers 502 when no PostgreSQL server gives pg_settings. A member or a PgBouncer that does not answer has an error in its entry.
/api/v1/database-services/{id}/settingstse_sessionAPI key · cookierequiredidstringrequiredOK
haproxyServiceSettingsHAProxyrequiredShow propertiesHide properties
appliesbooleanrequiredThe topology has HAProxy balancers.
notestringserversHaproxyServerSettings[]requiredOne entry per balancer. Empty when the topology has no balancers.
Show propertiesHide properties
HaproxyServerSettingserrorstringWhy the server has no values.
server_idstringrequiredsettingsHaproxySetting[]requiredShow propertiesHide properties
HaproxySettingapplystringrequiredA change needs a reload of HAProxy.
reloaddescriptionstringrequiredlock_reasonstringlockedbooleanrequiredA user cannot change the value.
namestringrequiredvaluestringrequiredtaken_atstring<date-time>The time of the stored haproxy.cfg that gave the values.
tunablesHaproxyTunable[]requiredThe tunables that an admin can change (ADR D16), with the override of each. Empty when the topology has no balancers.
Show propertiesHide properties
HaproxyTunabledefaultstringrequiredThe value with no override.
kindstringrequiredcount: a whole number. time: an HAProxy time, a whole number with the unit us, ms, s, m, h or d (no unit: ms).
counttimemaxstringrequiredmax_ofstringAnother tunable whose value is also an upper bound.
minstringrequirednamestringrequiredThe key of the tunable in the expert YAML and in the servers.
overrideSettingOverrideStateThe row of the overrides store (ADR D7). Absent when the store has no row.
Show propertiesHide properties
appliedstring | nullrequiredThe value of the last applied workflow. null: no workflow applied it.
pendingbooleanrequiredThe row waits for its apply (Not applied).
valuestring | nullrequiredThe value that the user wants. null: a reset that waits for its apply.
ownerstringrequireddefaultoverridehbaServiceSettingsHBArequiredThe HBA rules of the user, from the store of the console (TSE-1149).
Show propertiesHide properties
appliedHbaRule[]requiredThe user rules of the last applied workflow: the servers use them.
Show propertiesHide properties
HbaRuleaddressstringrequiredAn IPv4 or IPv6 CIDR with no host bits, for example 10.20.0.0/16. Empty for local.
commentstringA note of the user. The files do not get it.
databasestringrequiredall, sameuser, replication, or a comma list of database names.
methodstringrequiredscram-sha-256, md5, cert (hostssl only) or reject.
typestringrequiredhost, hostssl, hostnossl or local.
userstringrequiredall, or a comma list of user names.
defaultbooleanrequiredThe service has the default rules: one rule for all IPv4 addresses.
lockedHbaLockedRule[]requiredThe locked rule of the console. The rules of the server socket, loopback, the members and replication come before it.
Show propertiesHide properties
HbaLockedRuleaddressstringrequireddatabasestringrequiredmethodstringrequiredreasonstringrequiredtypestringrequireduserstringrequiredpendingbooleanrequiredThe rules wait for their apply.
rulesHbaRule[]requiredThe user rules that the user wants, in their order.
Show propertiesHide properties
HbaRuleaddressstringrequiredAn IPv4 or IPv6 CIDR with no host bits, for example 10.20.0.0/16. Empty for local.
commentstringA note of the user. The files do not get it.
databasestringrequiredall, sameuser, replication, or a comma list of database names.
methodstringrequiredscram-sha-256, md5, cert (hostssl only) or reject.
typestringrequiredhost, hostssl, hostnossl or local.
userstringrequiredall, or a comma list of user names.
versionstringrequiredThe version of the rules (a hash). A plan and an apply of hba send it back as hba_version (TSE-1203).
pgbouncerServiceSettingsPgBouncerrequiredShow propertiesHide properties
serversPgbouncerServerSettings[]requiredShow propertiesHide properties
PgbouncerServerSettingserrorstringserver_idstringrequiredsettingsPgbouncerSetting[]requiredShow propertiesHide properties
PgbouncerSettingapplystringrequiredrestart when changeable is no.
reloadrestartchangeablebooleanrequireddefaultstringrequiredkeystringrequiredvaluestringrequiredsettingsServiceSetting[]requiredThe settings of PgBouncer on the server that gave the PostgreSQL rows (or on the first server that answers), with the owner, the lock and the rules of each one. An admin changes the settings that are not locked.
Show propertiesHide properties
ServiceSettingapplystringrequiredWhat a change needs, from the context.
reloadrestartnoneboot_valstringcontextstringrequiredenumvalsstring[]errorstringWhy PostgreSQL refuses the value of the override, for example after an upgrade (ADR D18). The user resets or changes it.
lock_featurestringlock_reasonstringlockedbooleanrequiredmax_valstringmin_valstringnamestringrequiredoverrideSettingOverrideStateThe row of the overrides store (ADR D7). Absent when the store has no row.
ownerstringrequiredsizedconsoledefaultoverrideunmanagedalter_systempending_restartbooleanrequiredpending_restart_serversstring[]requiredThe servers where the parameter waits for a restart (pending_restart_reason of Patroni).
reset_valstringscopestringpgbouncer for a setting of PgBouncer. Absent for a PostgreSQL parameter.
pgbouncersettingstringrequiredshort_descstringsourcestringrequiredsourcefilestringunitstringvaluestringrequiredThe live value in the unit that a user writes (current_setting).
vartypestringrequiredThe vartype of pg_settings, or placeholder: a custom name of an override that no loaded library defines (pg_settings does not list it).
postgresqlServiceSettingsPostgreSQLrequiredShow propertiesHide properties
dcs_errorstringThe DCS of Patroni did not answer. A value that no owner wrote shows as a default.
membersServiceSettingsMember[]requiredThe pending restart of each PostgreSQL server.
Show propertiesHide properties
ServiceSettingsMembererrorstringnamestringpending_restartstringrequiredunknown: Patroni on the server did not answer.
yesnounknownrolestringserver_idstringrequirednotestringWhy the rows do not come from the leader, or not from the database of the service.
read_fromstringrequiredThe Patroni role of that server.
leaderreplicaunknownserver_idstringThe server that gave the rows of pg_settings.
settingsServiceSetting[]requiredShow propertiesHide properties
ServiceSettingapplystringrequiredWhat a change needs, from the context.
reloadrestartnoneboot_valstringcontextstringrequiredenumvalsstring[]errorstringWhy PostgreSQL refuses the value of the override, for example after an upgrade (ADR D18). The user resets or changes it.
lock_featurestringlock_reasonstringlockedbooleanrequiredmax_valstringmin_valstringnamestringrequiredoverrideSettingOverrideStateThe row of the overrides store (ADR D7). Absent when the store has no row.
ownerstringrequiredsizedconsoledefaultoverrideunmanagedalter_systempending_restartbooleanrequiredpending_restart_serversstring[]requiredThe servers where the parameter waits for a restart (pending_restart_reason of Patroni).
reset_valstringscopestringpgbouncer for a setting of PgBouncer. Absent for a PostgreSQL parameter.
pgbouncersettingstringrequiredshort_descstringsourcestringrequiredsourcefilestringunitstringvaluestringrequiredThe live value in the unit that a user writes (current_setting).
vartypestringrequiredThe vartype of pg_settings, or placeholder: a custom name of an override that no loaded library defines (pg_settings does not list it).
read_atstring<date-time>requiredThe time of the read.
settings_versioninteger<int64>requiredThe version of the overrides. A plan, an apply and a discard send it back.
Error
codestringStable code of the refusal, when the route has codes
detailsstring[]Additional detail, e.g. per-field validation failures
errorstringrequiredHuman-readable error message