Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQzso-0022aL-1U for pgsql-hackers@arkaria.postgresql.org; Sun, 24 May 2026 03:52:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wQzsm-00GRjM-13 for pgsql-hackers@arkaria.postgresql.org; Sun, 24 May 2026 03:52:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQzsl-00GRjE-3C for pgsql-hackers@lists.postgresql.org; Sun, 24 May 2026 03:52:08 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wQzsl-00000000VOO-0kLq for pgsql-hackers@postgresql.org; Sun, 24 May 2026 03:52:08 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-bdd1986cc86so369718966b.2 for ; Sat, 23 May 2026 20:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779594724; cv=none; d=google.com; s=arc-20240605; b=GGz2zIrbhcbjFfPlC9dOA4VH6LA/Hqvb9VQ/PieE/DzJQ+X2EzY2XL9N2Um49z8gUP niMTQZj+nXuu9TFnKGNbo/a9eEGUvWeBH4YlS8Mrz7fBuK58u+AAJJ6Oizl3fLv6LRgI 8Ra5j5vbz+uSBNEs79dgPQzCq+yVA4hB6WUdUUvXCVY3izaE9boMHGerkEaXzj3c2AqL sQqy3Cs8lff74dV/AAvts38qAe65KaOhoFKedBKejaP1ne+XQWlfPCavIcEOI46BP5HY ETf0Sf8fHCJtoBgDoNAEqaIQwEMK/KMACmgF+fEguVsEgtrxaGR/+mPaW9uAq+XidoVL 0qDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Fli6xEF7e0RWbVU3IjKTEfSrMQXeQ0ugtw5xlLOt3Ic=; fh=u6TDM5PRBbSoa0riOhVGJTevpibRhY+KzJ/VtZVohC0=; b=Kg5ticCbw+y0Mx9Zm2VnfdqQb23CuIYjdjxlXls51Z2ADSPKKcdz5tvCQ4zKNOmyMR NRfLTvt4cmE/Rhan4/nd/6txmpiy51tFsFzyVnyJevxmxxUtNI7vyr8NbwGf2RFWFOGZ pnBwLny+z/d4LIr+e0hR9lmjnLHOOKWHOgKjTFt64BpPgc88xBGzAAWEbD+5pthFbiP1 Hwz6vnz3FqZVhIbwn1M892oBAeoQhKNgiNzwuPvNBcEcc088BTrcyErAxDKFd7HE7Agp 4tTzBMBHW2O7qw/pnYCsDy/M/36bN+/0Yxh507hEYGWiQLeOvFq44nGA4Dzdjjb9VKJ1 tfog==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779594724; x=1780199524; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Fli6xEF7e0RWbVU3IjKTEfSrMQXeQ0ugtw5xlLOt3Ic=; b=BB9Is9jpyekrelSvlhQTzcLnndRuYBbQYuWRW9+lP1zMIFAIaJz9r/0DwtiqmlE+gO GTzYjXTR4CRADrpOSA9hLYyJ/jVzign2B0uAPkc5lhf7+JKxm8DZH/VfIGPg3NDWbeK4 9e+go4Mt2WnHPF51/0hIGPV2OdFxZryzWbcQa9Nuq5EJYEmSJ2WUbWUroYWV8b44Hn+Y 5jtVw5Z9xTIH6NvFphYDkV3cce7LZW+b2LUUScLZMhsnq8fTyU1AdFyH7yLIMbLnflCk 2nJqL6JGorc+OWKfgnXfunYtuwnGyLV8hIfKZ8RlrKnIV1RaGO1LJm2JgPtbvQpkbIkf W3dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779594724; x=1780199524; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Fli6xEF7e0RWbVU3IjKTEfSrMQXeQ0ugtw5xlLOt3Ic=; b=irfJOpSKe3jAksBdkULrxViPY3EwzLICSQLZdFm8iRmzCrb8HxRvTC5NxtAlRfjh2/ US+PcrlFitKeEFyuwZvnhTeocAeuBCI58nh4p4TPHM9xVzoiKJlpBW7FX+pnAz8Xdt4M P05yn3c1KjxVIAOrWRg/TwNE4lFJ59XQgCTT0+4tLbayHeUbpeDrwGTxRzZ1Py05ARan mJMJt7aOuUkO0mBWVkNakXCSSAy3m9sE08m9PwWyZaws6Eu5ppoIa+cDpsxlZV8HmEEB b11Vs0G6oX6nwmgv8f2DpJUUOCp7TXfDee6q1TX34wU7rNW+q3z8Pdz/G8+sF/kfq31Y F4Bw== X-Gm-Message-State: AOJu0YxF8XqUmJNAnwhxJfSdbUAUulRiNAqXFM5rFYNFj8OQ+kGura+E UW+irY5FeKJfbQV/9f9IlXQoGeHSv/UpJkYkYsKWwE+wR6XIjjwzqGj1aHiA1uzJVxF3xFRaqI9 2EPQPqYJXf5nl4Qmbp3JaJpuAbWs0IK3MCbYi4kU= X-Gm-Gg: Acq92OGzaH3H4IL3nL5J871BlKleCV8n+1kYpGrs3IFPVVvUMlqwJvEyny27UAYPLLG KvUX1y5D4lLzcQnTwjwpGwJV4UW0emj3mk9ZUdZDN4aoJGO4DT9oKsmpBUmuSlJkM5nc3HPnhx4 Xqlsh7SPXM+PHgIpMhyrzHh0H7bu8gA5bvzEqrxAgNchRgwpTrN8oYNt4dpc/DI80J2KGw/tR8g 1qstbFvSpEUXR2SCzyNmRIdXqVinXOqre4selzwy7vZwI+bNoATrBtjk9wlaAgfYX8dJBg8vNOa ssgcKHN+DkWmHlCAA3J4F+DpokKN4UvFGUHqHoPDJ7X/lLXyHlvG1tpOuohZ6JBHrDCO7fwh0wn Lz4DU3Y5+HT8XtzJPdVY= X-Received: by 2002:a17:907:3f0c:b0:bd4:7bcd:cd2e with SMTP id a640c23a62f3a-bdd279d2bd8mr663050766b.34.1779594723935; Sat, 23 May 2026 20:52:03 -0700 (PDT) MIME-Version: 1.0 References: <1F153E64-B791-42FA-A60A-64813B20B81E@gmail.com> <75CDE990-29D5-4D5C-BFE1-3840F19C0163@gmail.com> <1B695040-F544-447C-A6A8-C8BFF7F799D1@gmail.com> <1B9D2BAF-C73A-4A79-852C-17FB2A474AC0@gmail.com> <93526C6D-DE0A-4B7D-B908-366735FC211D@gmail.com> In-Reply-To: From: Xuneng Zhou Date: Sat, 23 May 2026 20:51:40 -0700 X-Gm-Features: AVHnY4INsh_0SP7W7HEvQrdQcKZg_0CoJz4me86-1GEtLHtoPxOKx_crjlZjRhY Message-ID: Subject: Re: Fix pg_stat_wal_receiver to show CONNECTING status To: Chao Li , Michael Paquier Cc: PostgreSQL-development , Michael Paquier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, May 23, 2026 at 8:51=E2=80=AFAM Xuneng Zhou = wrote: > > On Fri, May 22, 2026 at 4:56=E2=80=AFPM Chao Li = wrote: > > > > > > > > > On May 23, 2026, at 07:23, Michael Paquier wrot= e: > > > > > > On Fri, May 22, 2026 at 10:06:33AM +0800, Chao Li wrote: > > >> Here comes the patch set: > > >> > > >> * v3-0001 is the exactly same as v2-0001 > > >> * In v3-0002, the change in walreceiverfuncs.c is the same as the > > >> * previous diff, and I tuned the test change a little bit. > > > > > > Okay, applied the first one on HEAD, and backpatched the second one. > > > -- > > > Michael > > > > Thank you very much for applying the patch and still working hard durin= g the PGConf. > > > > > Thanks for dealing with this and sorry for being late in the game. > I'll do a post-commit review while I'm on the flight. I agree with Michael's point that displaying partial columns gated by the flag ready-to-display is not very ideal. Showing two columns in connecting status inconsistently in some scenarios implies something broken under the hood.[1] It may require extra documentation effort to dispel the confusion for the user. As for the timeline/lsn and timestamp values, they may still be useful operationally because they reveal when the WAL receiver entered this part of the code. Although they are not meant to be used and interpreted in this way... So there's some risk for misinterpretation, but they precedes the changes. [1] https://www.postgresql.org/message-id/aaj_WA1Du4micf9t@paquier.xyz -- Regards, Xuneng Zhou HighGo Software Co., Ltd.