{"Entry":{"collection":"guc","key":"synchronous_standby_names","name":"synchronous_standby_names","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Replication / Primary Server","category_zh":"","changed_in":["9.6","14"],"changes":[{"documentation_changed":false,"fields":{},"from":"9.0","status":"added","to":"9.1"},{"documentation_changed":true,"fields":{},"from":"9.1","status":"changed","to":"9.2"},{"documentation_changed":true,"fields":{},"from":"9.3","status":"changed","to":"9.4"},{"documentation_changed":true,"fields":{"short_desc":{"from":"List of names of potential synchronous standbys.","to":"Number of synchronous standbys and list of names of potential synchronous ones."}},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{},"from":"9.6","status":"changed","to":"10"},{"documentation_changed":true,"fields":{},"from":"11","status":"changed","to":"12"},{"documentation_changed":true,"fields":{"category":{"from":"Replication / Master Server","to":"Replication / Primary Server"}},"from":"13","status":"changed","to":"14"},{"documentation_changed":true,"fields":{},"from":"16","status":"changed","to":"17"},{"documentation_changed":true,"fields":{},"from":"17","status":"changed","to":"18"}],"content_hash":"aca9592967357ea6b5307447be272123de096736cec7b08f6d1c75e164992268","context":"","default_changed_in":[],"default_history":[{"from":"9.1","to":"19","value":"Empty string"}],"editorial":{"advice":{"olap":"Read standbys and logical subscribers often see long queries or large transactions. Put explicit bounds on replay/apply and monitor lag, worker saturation, slot restart_lsn, and conflict cancellations.","oltp":"Size synchronous_standby_names from topology, failover roles, slot/subscription count, and reconnect headroom. Test worst-case primary latency, standby replay, and disk retention before production.","small":"Configure only replication capacity that is actually used. Even a small topology needs bounded timeouts and slot lifecycle; unlimited retention is not reliability."},"mechanism":["Number of synchronous standbys and list of names of potential synchronous ones. A configuration reload applies a new value; existing work already in flight is not retroactively changed.","This parses priority FIRST or quorum ANY syntax over standby application_name values. It only defines eligible acknowledgers; synchronous_commit selects what each transaction waits for, and duplicate or wildcard names can make the chosen standby surprising.","Monitor and change synchronous_standby_names together with synchronous_commit, wal_sender_timeout, max_wal_senders. Validate on the relevant server role and real workload, then use its sighup context to choose session change, reload, or restart; a historical boot default is not the current effective value."],"pitfalls":["Assuming the list alone makes every transaction synchronous.","Using duplicate application_name values and getting nondeterministic priority.","Choosing ANY/FIRST counts that cannot be satisfied during planned maintenance.","Changing it on the wrong primary, standby, sender, or subscriber role.","Watching only configured bytes/time instead of actual lag, slot position, and worker state."],"references":[{"title":"PostgreSQL 19 Beta 4: synchronous_standby_names","url":"https://www.postgresql.org/docs/19/runtime-config-replication.html#GUC-SYNCHRONOUS-STANDBY-NAMES"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["synchronous_commit","wal_sender_timeout","max_wal_senders","application_name","synchronized_standby_slots","vacuum_defer_cleanup_age"],"summary":"synchronous_standby_names — Number of synchronous standbys and list of names of potential synchronous ones. Observed in PG9.1–19 Beta 4; its last measured boot default is empty string in PG19 Beta 4, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"9.1","group":"Replication","group_slug":"replication","imported_at":"2026-09-27T17:57:32.111164+08:00","intro_commit":{"authored_at":"2011-03-06T22:49:16Z","discussion":[],"hash":"a8a8a3e0965201df88bdfdff08f50e5c06c552b7","subject":"Efficient transaction-controlled synchronous replication. If a standby is broadcasting reply messages and we have named one or more standbys in synchronous_standby_names then allow users who set synchronous_replication to wait for commit, which then provides strict data integrity guarantees. Design avoids sending and receiving transaction state information so minimises bookkeeping overheads. We synchronize with the highest priority standby that is connected and ready to synchronize. Other standbys can be defined to takeover in case of standby failure.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a8a8a3e0965201df88bdfdff08f50e5c06c552b7"},"key":"synchronous_standby_names","last_version":"20","max_val":"","min_val":"","name":"synchronous_standby_names","position":400,"present_in":["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":"Specifies a list of standby servers that can support synchronous replication, as described in Section 26.2.8.","short_desc_zh":"","source_rev":"english-manuals:2a70e0cbdf2eade0723aede699df95514d8d955a23968c1a8413405504adf356","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"synchronous_standby_names","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"synchronous_standby_names","SourceRevision":"english-manuals:2a70e0cbdf2eade0723aede699df95514d8d955a23968c1a8413405504adf356","Facts":{"boot_val":"","category":"Replication / Primary Server","context":"sighup","description":"Specifies a list of standby servers that can support synchronous replication, as described in Section 26.2.8. There will be one or more active synchronous standbys; transactions waiting for commit will be allowed to proceed after these standby servers confirm receipt of their data. The synchronous standbys will be those whose names appear in this list, and that are both currently connected and streaming data in real-time (as shown by a state of streaming in the pg_stat_replication view). Specifying more than one synchronous standby can allow for very high availability and protection against data loss. The name of a standby server for this purpose is the application_name setting of the standby, as set in the standby's connection information. In case of a physical replication standby, this should be set in the primary_conninfo setting; the default is the setting of cluster_name if set, else walreceiver. For logical replication, this can be set in the connection information of the subscription, and it defaults to the subscription name. For other replication stream consumers, consult their documentation. This parameter specifies a list of standby servers using either of the following syntaxes: [FIRST] num_sync ( standby_name [, ...] ) ANY num_sync ( standby_name [, ...] ) standby_name [, ...] where num_sync is the number of synchronous standbys that transactions need to wait for replies from, and standby_name is the name of a standby server. num_sync must be an integer value greater than zero. FIRST and ANY specify the method to choose synchronous standbys from the listed servers. The keyword FIRST, coupled with num_sync, specifies a priority-based synchronous replication and makes transaction commits wait until their WAL records are replicated to num_sync synchronous standbys chosen based on their priorities. For example, a setting of FIRST 3 (s1, s2, s3, s4) will cause each commit to wait for replies from three higher-priority standbys chosen from standby servers s1, s2, s3 and s4. The standbys whose names appear earlier in the list are given higher priority and will be considered as synchronous. Other standby servers appearing later in this list represent potential synchronous standbys. If any of the current synchronous standbys disconnects for whatever reason, it will be replaced immediately with the next-highest-priority standby. The keyword FIRST is optional. The keyword ANY, coupled with num_sync, specifies a quorum-based synchronous replication and makes transaction commits wait until their WAL records are replicated to at least num_sync listed standbys. For example, a setting of ANY 3 (s1, s2, s3, s4) will cause each commit to proceed as soon as at least any three standbys of s1, s2, s3 and s4 reply. FIRST and ANY are case-insensitive. If these keywords are used as the name of a standby server, its standby_name must be double-quoted. The third syntax was used before PostgreSQL version 9.6 and is still supported. It's the same as the first syntax with FIRST and num_sync equal to 1. For example, FIRST 1 (s1, s2) and s1, s2 have the same meaning: either s1 or s2 is chosen as a synchronous standby. The special entry * matches any standby name. There is no mechanism to enforce uniqueness of standby names. In case of duplicates one of the matching standbys will be considered as higher priority, though exactly which one is indeterminate. Note Each standby_name should have the form of a valid SQL identifier, unless it is *. You can use double-quoting if necessary. But note that standby_names are compared to standby application names case-insensitively, whether double-quoted or not. If no synchronous standby names are specified here, then synchronous replication is not enabled and transaction commits will not wait for replication. This is the default configuration. Even when synchronous replication is enabled, individual transactions can be configured not to wait for replication by setting the synchronous_commit parameter to local or off. This parameter can only be set in the postgresql.conf file or on the server command line.","doc":{"anchor":"GUC-SYNCHRONOUS-STANDBY-NAMES","file":"runtime-config-replication.html","lang":"en","sha256":"c78480a202f8579e2655e080060afe4859c9eb26a16318fb9099dabb178fb32d","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"synchronous_standby_names","short_desc":"Number of synchronous standbys and list of names of potential synchronous ones.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-SYNCHRONOUS-STANDBY-NAMES","file":"runtime-config-replication.html","lang":"en","sha256":"c78480a202f8579e2655e080060afe4859c9eb26a16318fb9099dabb178fb32d","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"synchronous_standby_names","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"synchronous_standby_names","Summary":"","BodyHTML":"\u003cp\u003e如\u003ca href=\"/docs/18/warm-standby.html#SYNCHRONOUS-REPLICATION\" rel=\"nofollow\"\u003e第 26.2.8 节\u003c/a\u003e所述，这个参数指定一个支持\u003cem\u003e同步复制\u003c/em\u003e的备库的列表。将有一个或多个活动的同步备库，在这些备库确认收到它们的数据之后，等待提交的事务将被允许继续下去。同步备库是那些名字出现在这个列表中，并且当前已连接并且正在实时流式传输数据（如\u003ca href=\"/docs/18/monitoring-stats.html#MONITORING-PG-STAT-REPLICATION-VIEW\" rel=\"nofollow\"\u003e\u003ccode\u003epg_stat_replication\u003c/code\u003e\u003c/a\u003e视图中\u003ccode\u003estreaming\u003c/code\u003e的状态所示）的服务器。指定多于一台同步备库可以得到非常高的可用性并且能防止数据丢失。\u003c/p\u003e\u003cp\u003e用于这一目的的备库的名称是其\u003ccode\u003eapplication_name\u003c/code\u003e设置，它在备库的连接信息中设置。对于物理复制备库，应在 \u003ccode\u003eprimary_conninfo\u003c/code\u003e 设置中指定。若已设置\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-CLUSTER-NAME\" rel=\"nofollow\"\u003ecluster_name\u003c/a\u003e，则默认使用其值；否则默认值为 \u003ccode\u003ewalreceiver\u003c/code\u003e。对于逻辑复制，可以在订阅的连接信息中设置，默认值为订阅名称。对于其他复制流消费者，请参考其文档。\u003c/p\u003e\u003cp\u003e这个参数使用下面的语法之一来指定一个备库列表：\u003c/p\u003e\u003cpre\u003e[FIRST] \u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e ( \u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e [, ...] )\nANY \u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e ( \u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e [, ...] )\n\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e [, ...]\n\u003c/pre\u003e\u003cp\u003e其中\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e是事务需要等待其回复的同步备库的数量，\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e是一个备库的名称。\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e 必须是大于零的整数。\u003ccode\u003eFIRST\u003c/code\u003e以及\u003ccode\u003eANY\u003c/code\u003e指定从所列服务器中选取同步备库的方法。\u003c/p\u003e\u003cp\u003e关键词\u003ccode\u003eFIRST\u003c/code\u003e加上\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e指定一种基于优先级的同步复制，并且会让事务提交等待，直到它们的WAL记录被复制到基于优先级选择的\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e台同步备库上为止。例如，设置\u003ccode\u003eFIRST 3 (s1, s2, s3, s4)\u003c/code\u003e将导致每次提交都等待来自三台较高优先级的备库的答复，这三台备库将从备库\u003ccode\u003es1\u003c/code\u003e、\u003ccode\u003es2\u003c/code\u003e、\u003ccode\u003es3\u003c/code\u003e以及\u003ccode\u003es4\u003c/code\u003e中选出。在该列表中出现较早的备库将被给予较高的优先级，并且将被考虑为同步备库。列表中出现的其他备库表示潜在的同步备库。如果当前的任何同步备库因为某种原因断开连接，它将立刻被下一个最高优先级的备库替代。关键词\u003ccode\u003eFIRST\u003c/code\u003e是可选的。\u003c/p\u003e\u003cp\u003e关键词\u003ccode\u003eANY\u003c/code\u003e加上\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e指定一种基于法定人数的同步复制，并且会让事务提交等待，直到它们的WAL记录被复制到所列出备库中的\u003cspan\u003e\u003cem\u003e至少\u003c/em\u003e\u003c/span\u003e\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e台上为止。例如，设置\u003ccode\u003eANY 3 (s1, s2, s3, s4)\u003c/code\u003e将导致每次提交会在收到\u003ccode\u003es1\u003c/code\u003e、\u003ccode\u003es2\u003c/code\u003e、\u003ccode\u003es3\u003c/code\u003e以及\u003ccode\u003es4\u003c/code\u003e中任意三台备库的回答后立刻继续下去。\u003c/p\u003e\u003cp\u003e\u003ccode\u003eFIRST\u003c/code\u003e和\u003ccode\u003eANY\u003c/code\u003e是大小写不敏感的。如果这些关键词被用作备库的名字，其\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e必须被放在双引号内。\u003c/p\u003e\u003cp\u003e\u003cspan\u003ePostgreSQL\u003c/span\u003e版本 9.6 之前使用过第三种语法，目前也仍然支持。它与使用\u003ccode\u003eFIRST\u003c/code\u003e且\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e等于1的第一种语法相同。例如，\u003ccode\u003eFIRST 1 (s1, s2)\u003c/code\u003e和\u003ccode\u003es1, s2\u003c/code\u003e具有相同的含义：\u003ccode\u003es1\u003c/code\u003e或者\u003ccode\u003es2\u003c/code\u003e会被选中作为同步备库。\u003c/p\u003e\u003cp\u003e特殊项\u003ccode\u003e*\u003c/code\u003e匹配任意备库名称。\u003c/p\u003e\u003cp\u003e没有机制强制备库名称的唯一性。在出现重复的情况下，匹配的备库之一将被认为是较高优先级，不过无法弄清到底是哪一个。\u003c/p\u003e\u003cdiv\u003e\n注意\u003cp\u003e每一个\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e都应该具有合法 SQL 标识符的形式，除非它是\u003ccode\u003e*\u003c/code\u003e。如果必要你可以使用双引号。但是注意在比较\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e和备库应用程序名称时是大小写不敏感的（不管有没有双引号）。\u003c/p\u003e\u003c/div\u003e\u003cp\u003e如果这里没有指定同步备库名称，那么不启用同步复制并且事务提交将不会等待复制。这是默认的配置。即便当同步复制被启用时，个体事务也可以被配置为不等待复制，做法是将\u003ca href=\"/docs/18/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT\" rel=\"nofollow\"\u003esynchronous_commit\u003c/a\u003e参数设置为\u003ccode\u003elocal\u003c/code\u003e或\u003ccode\u003eoff\u003c/code\u003e。\u003c/p\u003e\u003cp\u003e这个参数只能在\u003ccode\u003epostgresql.conf\u003c/code\u003e文件中或通过服务器命令行进行设置。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"84e2352a73a63101aaebd35bc173f00c94235504a8c2178a739fe74ed33d95b3","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e如\u003ca href=\"/docs/18/warm-standby.html#SYNCHRONOUS-REPLICATION\" title=\"26.2.8. 同步复制\"\u003e第 26.2.8 节\u003c/a\u003e所述，这个参数指定一个支持\u003cem\u003e同步复制\u003c/em\u003e的备库的列表。将有一个或多个活动的同步备库，在这些备库确认收到它们的数据之后，等待提交的事务将被允许继续下去。同步备库是那些名字出现在这个列表中，并且当前已连接并且正在实时流式传输数据（如\u003ca href=\"/docs/18/monitoring-stats.html#MONITORING-PG-STAT-REPLICATION-VIEW\" title=\"27.2.4. pg_stat_replication\"\u003e\u003ccode class=\"structname\"\u003epg_stat_replication\u003c/code\u003e\u003c/a\u003e视图中\u003ccode class=\"literal\"\u003estreaming\u003c/code\u003e的状态所示）的服务器。指定多于一台同步备库可以得到非常高的可用性并且能防止数据丢失。\u003c/p\u003e\u003cp\u003e用于这一目的的备库的名称是其\u003ccode class=\"varname\"\u003eapplication_name\u003c/code\u003e设置，它在备库的连接信息中设置。对于物理复制备库，应在 \u003ccode class=\"varname\"\u003eprimary_conninfo\u003c/code\u003e 设置中指定。若已设置\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-CLUSTER-NAME\"\u003ecluster_name\u003c/a\u003e，则默认使用其值；否则默认值为 \u003ccode class=\"literal\"\u003ewalreceiver\u003c/code\u003e。对于逻辑复制，可以在订阅的连接信息中设置，默认值为订阅名称。对于其他复制流消费者，请参考其文档。\u003c/p\u003e\u003cp\u003e这个参数使用下面的语法之一来指定一个备库列表：\u003c/p\u003e\u003cpre\u003e[FIRST] \u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e ( \u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e [, ...] )\nANY \u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e ( \u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e [, ...] )\n\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e [, ...]\n\u003c/pre\u003e\u003cp\u003e其中\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e是事务需要等待其回复的同步备库的数量，\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e是一个备库的名称。\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e 必须是大于零的整数。\u003ccode class=\"literal\"\u003eFIRST\u003c/code\u003e以及\u003ccode class=\"literal\"\u003eANY\u003c/code\u003e指定从所列服务器中选取同步备库的方法。\u003c/p\u003e\u003cp\u003e关键词\u003ccode class=\"literal\"\u003eFIRST\u003c/code\u003e加上\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e指定一种基于优先级的同步复制，并且会让事务提交等待，直到它们的WAL记录被复制到基于优先级选择的\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e台同步备库上为止。例如，设置\u003ccode class=\"literal\"\u003eFIRST 3 (s1, s2, s3, s4)\u003c/code\u003e将导致每次提交都等待来自三台较高优先级的备库的答复，这三台备库将从备库\u003ccode class=\"literal\"\u003es1\u003c/code\u003e、\u003ccode class=\"literal\"\u003es2\u003c/code\u003e、\u003ccode class=\"literal\"\u003es3\u003c/code\u003e以及\u003ccode class=\"literal\"\u003es4\u003c/code\u003e中选出。在该列表中出现较早的备库将被给予较高的优先级，并且将被考虑为同步备库。列表中出现的其他备库表示潜在的同步备库。如果当前的任何同步备库因为某种原因断开连接，它将立刻被下一个最高优先级的备库替代。关键词\u003ccode class=\"literal\"\u003eFIRST\u003c/code\u003e是可选的。\u003c/p\u003e\u003cp\u003e关键词\u003ccode class=\"literal\"\u003eANY\u003c/code\u003e加上\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e指定一种基于法定人数的同步复制，并且会让事务提交等待，直到它们的WAL记录被复制到所列出备库中的\u003cspan class=\"emphasis\"\u003e\u003cem\u003e至少\u003c/em\u003e\u003c/span\u003e\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e台上为止。例如，设置\u003ccode class=\"literal\"\u003eANY 3 (s1, s2, s3, s4)\u003c/code\u003e将导致每次提交会在收到\u003ccode class=\"literal\"\u003es1\u003c/code\u003e、\u003ccode class=\"literal\"\u003es2\u003c/code\u003e、\u003ccode class=\"literal\"\u003es3\u003c/code\u003e以及\u003ccode class=\"literal\"\u003es4\u003c/code\u003e中任意三台备库的回答后立刻继续下去。\u003c/p\u003e\u003cp\u003e\u003ccode class=\"literal\"\u003eFIRST\u003c/code\u003e和\u003ccode class=\"literal\"\u003eANY\u003c/code\u003e是大小写不敏感的。如果这些关键词被用作备库的名字，其\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e必须被放在双引号内。\u003c/p\u003e\u003cp\u003e\u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e版本 9.6 之前使用过第三种语法，目前也仍然支持。它与使用\u003ccode class=\"literal\"\u003eFIRST\u003c/code\u003e且\u003cem\u003e\u003ccode\u003enum_sync\u003c/code\u003e\u003c/em\u003e等于1的第一种语法相同。例如，\u003ccode class=\"literal\"\u003eFIRST 1 (s1, s2)\u003c/code\u003e和\u003ccode class=\"literal\"\u003es1, s2\u003c/code\u003e具有相同的含义：\u003ccode class=\"literal\"\u003es1\u003c/code\u003e或者\u003ccode class=\"literal\"\u003es2\u003c/code\u003e会被选中作为同步备库。\u003c/p\u003e\u003cp\u003e特殊项\u003ccode class=\"literal\"\u003e*\u003c/code\u003e匹配任意备库名称。\u003c/p\u003e\u003cp\u003e没有机制强制备库名称的唯一性。在出现重复的情况下，匹配的备库之一将被认为是较高优先级，不过无法弄清到底是哪一个。\u003c/p\u003e\u003cdiv class=\"note\"\u003e\n注意\u003cp\u003e每一个\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e都应该具有合法 SQL 标识符的形式，除非它是\u003ccode class=\"literal\"\u003e*\u003c/code\u003e。如果必要你可以使用双引号。但是注意在比较\u003cem\u003e\u003ccode\u003estandby_name\u003c/code\u003e\u003c/em\u003e和备库应用程序名称时是大小写不敏感的（不管有没有双引号）。\u003c/p\u003e\u003c/div\u003e\u003cp\u003e如果这里没有指定同步备库名称，那么不启用同步复制并且事务提交将不会等待复制。这是默认的配置。即便当同步复制被启用时，个体事务也可以被配置为不等待复制，做法是将\u003ca href=\"/docs/18/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT\"\u003esynchronous_commit\u003c/a\u003e参数设置为\u003ccode class=\"literal\"\u003elocal\u003c/code\u003e或\u003ccode class=\"literal\"\u003eoff\u003c/code\u003e。\u003c/p\u003e\u003cp\u003e这个参数只能在\u003ccode class=\"filename\"\u003epostgresql.conf\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","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
