{"Entry":{"collection":"guc","key":"superuser_reserved_connections","name":"superuser_reserved_connections","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Connections and Authentication / Connection Settings","category_zh":"","changed_in":["9.1","9.6"],"changes":[{"documentation_changed":true,"fields":{},"from":"7.4","status":"changed","to":"8.0"},{"documentation_changed":true,"fields":{},"from":"8.1","status":"changed","to":"8.2"},{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"},{"documentation_changed":false,"fields":{"max_val":{"from":"536870911","to":"8388607"}},"from":"9.0","status":"changed","to":"9.1"},{"documentation_changed":false,"fields":{"max_val":{"from":"8388607","to":"262143"}},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{},"from":"9.6","status":"changed","to":"10"},{"documentation_changed":true,"fields":{},"from":"10","status":"changed","to":"11"},{"documentation_changed":true,"fields":{},"from":"11","status":"changed","to":"12"},{"documentation_changed":true,"fields":{},"from":"15","status":"changed","to":"16"}],"content_hash":"1d9df64b368e1b0a92b58aef243393f81325ca5586759a713826a34ac13d4b74","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"3"}],"editorial":{"advice":{"olap":"Reserve enough slots for control, monitoring, and cancellation around heavy analytical sessions, but do not let reserves consume an excessive share of a deliberately small backend pool.","oltp":"Size superuser_reserved_connections inside max_connections from the number of independent emergency actors, pooler behavior, and failover operations. Test that ordinary saturation still leaves usable administrative access.","small":"Keep superuser_reserved_connections modest relative to max_connections while preserving at least one tested emergency path; reserved slots are capacity unavailable to ordinary clients at saturation."},"mechanism":["superuser_reserved_connections sets the number of connection slots reserved for superusers. These slots are usable only after ordinary and reserved_connections capacity is exhausted, preserving an emergency path for superusers.","superuser_reserved_connections is a POSTMASTER-context setting: PostgreSQL reads it during server startup, and a configuration reload or session SET cannot activate a new value.","reserved_connections and superuser_reserved_connections carve privileged tiers from max_connections; poolers, monitoring, replication, maintenance, and failover must all fit the same total backend budget."],"pitfalls":["Expecting a reload or SET to activate superuser_reserved_connections, although it requires a controlled server restart.","Counting reserved slots outside max_connections even though every tier consumes the same total ceiling.","Reserving too little for incident response or so much that ordinary application capacity collapses at saturation.","Changing superuser_reserved_connections globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: superuser_reserved_connections","url":"https://www.postgresql.org/docs/19/runtime-config-connection.html#GUC-SUPERUSER-RESERVED-CONNECTIONS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["listen_addresses","port","max_connections","reserved_connections","unix_socket_directories"],"summary":"superuser_reserved_connections is the PostgreSQL setting that defines the number of connection slots reserved for superusers."},"enumvals":[],"first_version":"7.4","group":"Connections and Authentication","group_slug":"connection","imported_at":"2026-09-27T17:57:32.084362+08:00","intro_commit":{},"key":"superuser_reserved_connections","last_version":"20","max_val":"","min_val":"","name":"superuser_reserved_connections","position":395,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Determines the number of connection “slots” that are reserved for connections by PostgreSQL superusers.","short_desc_zh":"","source_rev":"english-manuals:3c3d710a1cbc9d7aa4e6c65f642d4753784ad6d3383aba5113103fc039a9944b","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"superuser_reserved_connections","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"superuser_reserved_connections","SourceRevision":"english-manuals:3c3d710a1cbc9d7aa4e6c65f642d4753784ad6d3383aba5113103fc039a9944b","Facts":{"boot_val":"3","category":"Connections and Authentication / Connection Settings","context":"postmaster","description":"Determines the number of connection “slots” that are reserved for connections by PostgreSQL superusers. At most max_connections connections can ever be active simultaneously. Whenever the number of active concurrent connections is at least max_connections minus superuser_reserved_connections, new connections will be accepted only for superusers. The connection slots reserved by this parameter are intended as final reserve for emergency use after the slots reserved by reserved_connections have been exhausted. The default value is three connections. The value must be less than max_connections minus reserved_connections. This parameter can only be set at server start.","doc":{"anchor":"GUC-SUPERUSER-RESERVED-CONNECTIONS","file":"runtime-config-connection.html","lang":"en","sha256":"567ba928f3e4c4783f548dc8a54f1e748f02bbe163924605f2132eb5b0da440d","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"262143","metadata_version":"18","min_val":"0","name":"superuser_reserved_connections","short_desc":"Sets the number of connection slots reserved for superusers.","source":"pg-settings-source-snapshot","unit":null,"vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-SUPERUSER-RESERVED-CONNECTIONS","file":"runtime-config-connection.html","lang":"en","sha256":"567ba928f3e4c4783f548dc8a54f1e748f02bbe163924605f2132eb5b0da440d","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"superuser_reserved_connections","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"superuser_reserved_connections","Summary":"","BodyHTML":"\u003cp\u003e决定为 \u003cspan\u003ePostgreSQL\u003c/span\u003e 超级用户连接保留多少个连接\u003cspan\u003e“\u003cspan\u003e槽\u003c/span\u003e”\u003c/span\u003e。同时活跃的连接数最多始终只能达到\u003ca href=\"/docs/18/runtime-config-connection.html#GUC-MAX-CONNECTIONS\" rel=\"nofollow\"\u003emax_connections\u003c/a\u003e。当活跃并发连接数至少达到 \u003ccode\u003emax_connections\u003c/code\u003e 减去 \u003ccode\u003esuperuser_reserved_connections\u003c/code\u003e 时，新连接将只接受超级用户。由该参数保留的连接槽是在\u003ca href=\"/docs/18/runtime-config-connection.html#GUC-RESERVED-CONNECTIONS\" rel=\"nofollow\"\u003ereserved_connections\u003c/a\u003e保留的连接槽耗尽之后，用于紧急情况的最后储备。\u003c/p\u003e\u003cp\u003e默认值是 3 个连接。该值必须小于 \u003ccode\u003emax_connections\u003c/code\u003e 减去 \u003ccode\u003ereserved_connections\u003c/code\u003e。这个参数只能在服务器启动时设置。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"7e4547f5a9544fd49ee3cc32314932b6f264a2fb1acf00ef478b84a35f743f23","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e决定为 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 超级用户连接保留多少个连接\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e槽\u003c/span\u003e”\u003c/span\u003e。同时活跃的连接数最多始终只能达到\u003ca href=\"/docs/18/runtime-config-connection.html#GUC-MAX-CONNECTIONS\"\u003emax_connections\u003c/a\u003e。当活跃并发连接数至少达到 \u003ccode class=\"varname\"\u003emax_connections\u003c/code\u003e 减去 \u003ccode class=\"varname\"\u003esuperuser_reserved_connections\u003c/code\u003e 时，新连接将只接受超级用户。由该参数保留的连接槽是在\u003ca href=\"/docs/18/runtime-config-connection.html#GUC-RESERVED-CONNECTIONS\"\u003ereserved_connections\u003c/a\u003e保留的连接槽耗尽之后，用于紧急情况的最后储备。\u003c/p\u003e\u003cp\u003e默认值是 3 个连接。该值必须小于 \u003ccode class=\"varname\"\u003emax_connections\u003c/code\u003e 减去 \u003ccode class=\"varname\"\u003ereserved_connections\u003c/code\u003e。这个参数只能在服务器启动时设置。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
