{"Entry":{"collection":"waitevent","key":"client/LibpqwalreceiverConnect","name":"LibpqwalreceiverConnect","aliases":["LibPQWalReceiverConnect","LibpqwalreceiverConnect"],"metadata":{"aliases":["LibPQWalReceiverConnect","LibpqwalreceiverConnect"],"changed_in":["17"],"changes":[{"from":"9.6","moved":null,"renamed":null,"reworded":null,"status":"added","to":"10"},{"from":"16","moved":null,"renamed":{"from":"LibPQWalReceiverConnect","to":"LibpqwalreceiverConnect"},"reworded":null,"status":"changed","to":"17"}],"content_hash":"90a56ae7b340beaf3233383c5e086328f8978ed7026a7ae3a3acb1bfd66cacd9","dossier":{"actions":{"en":["Check state and transaction age before counting the wait as load.","Correlate with the owning application, pool, and network path.","Fix consumer backpressure or pool policy rather than repeatedly terminating connections."],"zh":["先看 state 与事务年龄，再决定它是否算负载。","关联负责的应用、连接池与网络路径。","修复消费者背压或连接池策略，不要反复终止连接。"]},"diagnostic_sql":[{"id":"sessions","min_version":"13","sql":"SELECT pid, backend_type, usename, datname, application_name,\n       state, now() - query_start AS query_age,\n       now() - xact_start AS xact_age,\n       wait_event_type, wait_event,\n       pg_blocking_pids(pid) AS blocking_pids,\n       left(query, 160) AS query\nFROM pg_stat_activity\nWHERE wait_event_type = 'Client'\n  AND wait_event = 'LibpqwalreceiverConnect'\nORDER BY query_age DESC NULLS LAST;","title":"Sessions waiting on Client/LibpqwalreceiverConnect","title_zh":"正在等待 Client/LibpqwalreceiverConnect 的会话"},{"id":"cohort","min_version":"13","sql":"SELECT wait_event, count(*) AS waiting_sessions,\n       count(*) FILTER (WHERE state = 'active') AS active_waiters,\n       max(now() - query_start) AS oldest_query\nFROM pg_stat_activity\nWHERE wait_event_type = 'Client'\nGROUP BY wait_event\nORDER BY waiting_sessions DESC, wait_event;","title":"Current Client cohort","title_zh":"当前 Client 等待分布"},{"id":"lock_objects","min_version":"13","sql":"SELECT a.pid, l.locktype, l.mode, l.granted, l.fastpath,\n       d.datname, n.nspname, c.relname,\n       l.page, l.tuple, l.virtualxid, l.transactionid,\n       l.classid, l.objid, l.objsubid\nFROM pg_stat_activity AS a\nLEFT JOIN pg_locks AS l ON l.pid = a.pid\nLEFT JOIN pg_database AS d ON d.oid = l.database\nLEFT JOIN pg_class AS c\n  ON c.oid = l.relation\n AND l.database = (\n       SELECT oid FROM pg_database WHERE datname = current_database()\n     )\nLEFT JOIN pg_namespace AS n ON n.oid = c.relnamespace\nWHERE a.wait_event_type = 'Client'\n  AND a.wait_event = 'LibpqwalreceiverConnect'\nORDER BY a.pid, l.granted, l.locktype, l.mode;","title":"Lock and relation context for these sessions","title_zh":"这些会话的锁与关系上下文"}],"emission":{"status":"active","verified_release":"18.6"},"gucs":["wal_buffers","synchronous_commit","max_connections","idle_in_transaction_session_timeout"],"incident_pattern":{"en":"","zh":""},"mechanism":{"en":"`WAIT_EVENT_LIBPQWALRECEIVER_CONNECT` at `src/backend/replication/libpqwalreceiver/libpqwalreceiver.c:231` is the grep-verified reporting path. The public identity/resource is mapped at `src/backend/utils/activity/wait_event.c:280`. The instrumented operation is: Waiting in WAL receiver to establish connection to remote server. The frontend protocol path reports LibpqwalreceiverConnect immediately before a socket, TLS/GSS, or replication-client operation blocks. PostgreSQL is waiting for the remote side or network to progress.","zh":"`WAIT_EVENT_LIBPQWALRECEIVER_CONNECT` 位于 `src/backend/replication/libpqwalreceiver/libpqwalreceiver.c:231`，是经 grep 核验的报告路径。公共身份/资源映射位于 `src/backend/utils/activity/wait_event.c:280`。探针覆盖的操作是：在 WAL receiver 中等待与远程服务器建立连接。前端协议路径在套接字、TLS/GSS 或复制客户端操作即将阻塞前报告 LibpqwalreceiverConnect；PostgreSQL 正在等待远端或网络推进。"},"metrics":["waiting_sessions","wait_event_share","wal_bytes","wal_write_time","active_backends"],"normal":{"en":"Idle ClientRead sessions are normal connection-pool inventory.","zh":"空闲状态的 ClientRead 通常只是连接池存量。"},"official_descriptions":{"17":"Waiting in WAL receiver to establish connection to remote server","18":"Waiting in WAL receiver to establish connection to remote server"},"record_kind":"event","source_locations":[{"commit":"7d3e000c5961a544302072058a1184e9a588837b","excerpt":"WAIT_EVENT_LIBPQWALRECEIVER_CONNECT);","grep_pattern":"WAIT_EVENT_LIBPQWALRECEIVER_CONNECT","grep_verified":true,"kind":"trigger","line":231,"major":16,"path":"src/backend/replication/libpqwalreceiver/libpqwalreceiver.c","status":"live_trigger","symbol":"WAIT_EVENT_LIBPQWALRECEIVER_CONNECT","tag":"REL_16_15","url":"https://github.com/postgres/postgres/blob/REL_16_15/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c#L231","version":"16.15"},{"commit":"7d3e000c5961a544302072058a1184e9a588837b","excerpt":"event_name = \"LibPQWalReceiverConnect\";","grep_pattern":"LibPQWalReceiverConnect","grep_verified":true,"kind":"catalog_definition","line":280,"major":16,"path":"src/backend/utils/activity/wait_event.c","status":"live_trigger","symbol":"LibPQWalReceiverConnect","tag":"REL_16_15","url":"https://github.com/postgres/postgres/blob/REL_16_15/src/backend/utils/activity/wait_event.c#L280","version":"16.15"},{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","excerpt":"WAIT_EVENT_LIBPQWALRECEIVER_CONNECT);","grep_pattern":"WAIT_EVENT_LIBPQWALRECEIVER_CONNECT","grep_verified":true,"kind":"trigger","line":228,"major":18,"path":"src/backend/replication/libpqwalreceiver/libpqwalreceiver.c","status":"live_trigger","symbol":"WAIT_EVENT_LIBPQWALRECEIVER_CONNECT","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/REL_18_6/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c#L228","version":"18.6"},{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","excerpt":"LIBPQWALRECEIVER_CONNECT\t\"Waiting in WAL receiver to establish connection to remote server.\"","grep_pattern":"LIBPQWALRECEIVER_CONNECT","grep_verified":true,"kind":"catalog_definition","line":88,"major":18,"path":"src/backend/utils/activity/wait_event_names.txt","status":"live_trigger","symbol":"LIBPQWALRECEIVER_CONNECT","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/REL_18_6/src/backend/utils/activity/wait_event_names.txt#L88","version":"18.6"}],"source_status":"live_trigger","trouble":{"en":"Investigate active writes, handshakes, old idle-in-transaction sessions, connection exhaustion, or replication-client stalls.","zh":"活动写入、握手、很老的 idle in transaction、连接耗尽或复制客户端停滞时需要调查。"}},"first_version":"10","has_dossier":true,"imported_at":"2026-09-27T17:57:32.520492+08:00","key":"client/libpqwalreceiverconnect","last_version":"20","name":"LibpqwalreceiverConnect","position":28,"present_in":["10","11","12","13","14","15","16","17","18","19","20"],"slug":"libpqwalreceiver-connect","source_rev":"english-manuals:c67c4a4d435d2e041ee00bf656d569c98fcc9ce5c9d6079a4456d040d67ae759","summary":"Waiting in WAL receiver to establish connection to remote server.","summary_zh":"","type":"Client","type_slug":"client","type_variants":["Client"]}},"Definition":{"Collection":"waitevent","Key":"client/LibpqwalreceiverConnect","SourceDatabase":"center","Version":"18","SourceTable":"waitevent","SourceKey":"client/libpqwalreceiverconnect","SourceRevision":"english-manuals:c67c4a4d435d2e041ee00bf656d569c98fcc9ce5c9d6079a4456d040d67ae759","Facts":{"description":"Waiting in WAL receiver to establish connection to remote server.","description_zh":"","doc":{"anchor":"WAIT-EVENT-CLIENT-TABLE","file":"monitoring-stats.html","lang":"en","sha256":"aa979eed08627fbf715a9d792094a162a73671db5af810f3ab2aad3e073d5722","slug":"18"},"lang":"en","name":"LibpqwalreceiverConnect","source":"english-manual","type":"Client","zh_from":""},"ManualEvidence":{"doc":{"anchor":"WAIT-EVENT-CLIENT-TABLE","file":"monitoring-stats.html","lang":"en","sha256":"aa979eed08627fbf715a9d792094a162a73671db5af810f3ab2aad3e073d5722","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"waitevent","Key":"client/LibpqwalreceiverConnect","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"LibpqwalreceiverConnect","Summary":"在 WAL 接收进程中等待与远程服务器建立连接。","BodyHTML":"\u003cp\u003e在 WAL 接收进程中等待与远程服务器建立连接。\u003c/p\u003e","SourceRevision":"2026-08-31@34d13c8","ContentHash":"c4988d65a8e4406682c196b23b98fb76db58033d317058e78fe73c39feb4f08c","Payload":{"description_zh":"在 WAL 接收进程中等待与远程服务器建立连接。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
