Review settings changes
Validates a change set (or a YAML document of all overrides) against pg_settings of the leader, SHOW CONFIG of PgBouncer and the locks of the owners, and gives one review row per setting: the old and the new value, the owner, a reload or a restart, and the servers that restart in order. A change of the PgBouncer pool size gives a derived row for work_mem, which follows the pool size. A decrease of max_connections, max_locks_per_transaction or max_prepared_transactions (a row, or a change that waits for a restart) restarts the leader first, when no such parameter goes up; with an increase too, the replicas restart first and the decrease waits for the next restart. The rows also hold the overrides that wait for their apply. hba (or the hba section of the YAML document) is the whole list of the HBA rules of the user; the review checks each rule and counts the rules that the change adds, removes and changes. A plan writes nothing, and it works while a workflow runs. It answers 409 when settings_version is not the version of the store.
/api/v1/database-services/{id}/settings/plantse_sessionAPI key · cookierequiredidstringrequiredapplication/jsonchangesSettingChangeInput[]The changes. Omit changes and yaml to review the overrides that wait for their apply.
Show propertiesHide properties
SettingChangeInputnamestringrequiredscopestringrequiredThe scope of the setting: a PostgreSQL parameter, a setting of PgBouncer, or an HAProxy tunable of ADR D16.
postgresqlpgbouncerhaproxyvaluestring | nullrequiredThe new value, as a user writes it (for example 1min). null: a reset.
hbaHbaRule[]All HBA rules of the user, in their order (ADR D17), in place of the hba section of yaml. Omit it to keep the rules.
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.
hba_versionstringWith hba: hba.version of the settings read that the user changed. Another version of the rules gives 409, and a change of other settings does not.
settings_versioninteger<int64>requiredThe version that the user saw: settings_version of the settings or of the YAML read.
yamlstringAll overrides as one YAML document (ADR D14), in place of changes. A key that is not in the document is a reset.
OK
derivedSettingsDerivedRow[]requiredThe settings that the console changes because of a row, for example work_mem after a change of the pool size of PgBouncer (ADR D15).
Show propertiesHide properties
SettingsDerivedRowapplystringrequiredreloadnamestringrequirednewstringrequiredThe value after the apply, or an estimate of it.
notestringoldstringrequiredThe live value.
ownerstringrequiredsizedscopestringrequiredpostgresqlerrorsstring[]requiredThe errors that are not of one row, for example of the YAML document.
hbaSettingsPlanHBAThe review of the HBA rules, when the rules after the change differ from the applied rules (TSE-1149). A change of the rules needs only a reload.
Show propertiesHide properties
addedinteger<int64>requiredThe rules that the change adds, by position.
appliedHbaRule[]requiredThe user rules that the servers use now.
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.
changedinteger<int64>requirederrorsstring[]requiredremovedinteger<int64>requiredrulesSettingsPlanHBARule[]requiredThe user rules after the change, in their order.
Show propertiesHide properties
SettingsPlanHBARuleaddressstringrequiredcommentstringdatabasestringrequirederrorsstring[]requiredlineinteger<int64>The line of the rule in the YAML document.
methodstringrequiredtypestringrequireduserstringrequiredwarningsstring[]requiredwarningsstring[]requiredleader_firstbooleanrequiredA parameter that a replica needs at the value of the leader or higher goes down (a row, or a change that waits for a restart), and no such parameter goes up. The restart starts with the leader, and the writes stop for the time of its restart. With an increase too, the replicas restart first and the decrease waits for the next restart.
restartbooleanrequiredA row needs a restart of PostgreSQL.
restart_serversSettingsRestartServer[]requiredThe servers that restart, in order. Empty when no row needs a restart.
Show propertiesHide properties
SettingsRestartServernamestringrolestringserver_idstringrequiredrowsSettingsPlanRow[]requiredOne row per setting that the apply changes: the changes, and the overrides that wait for their apply.
Show propertiesHide properties
SettingsPlanRowapplystringrequiredreloadrestartnoneerrorsstring[]requiredleader_firstbooleanrequiredThe row lowers a parameter that a replica needs at the value of the leader or higher.
lineinteger<int64>The line of the key in the YAML document.
namestringrequirednewstring | nullrequiredThe new value. null: a reset.
new_ownerstringrequiredoverridedefaultnotestringoldstringrequiredThe live value.
old_ownerstringThe owner of the live value. Empty when pg_settings has no such parameter.
reset_tostringThe value after a reset, when the console knows it: the shipped default or the PostgreSQL default.
scopestringrequiredwarningsstring[]requiredsettings_versioninteger<int64>requiredvalidbooleanrequiredNo row and no part of the YAML document has an error. An apply needs a valid plan.
yaml_afterstringrequiredThe overrides as YAML after the change.
yaml_beforestringrequiredThe overrides as YAML before the change (ADR D14).
Error
codestringStable code of the refusal, when the route has codes
detailsstring[]Additional detail, e.g. per-field validation failures
errorstringrequiredHuman-readable error message