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 1vuljo-005Vi4-28 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Feb 2026 06:17:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vuljn-00HJgh-1m for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Feb 2026 06:17:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vuljn-00HJgZ-0r for pgsql-hackers@lists.postgresql.org; Tue, 24 Feb 2026 06:17:39 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vuljk-00000000zPJ-1XfJ for pgsql-hackers@lists.postgresql.org; Tue, 24 Feb 2026 06:17:39 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-38709888abeso43237191fa.1 for ; Mon, 23 Feb 2026 22:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771913856; cv=none; d=google.com; s=arc-20240605; b=T+fehrNWZoo7yh7D2BEwpyBO1Y7bvwR/TC+dx3Ys/6SxFHy3FBq98yDg3nnpzqU/RH LME+6nVEaeBsVIdyEdkRwSXnEa+hXe2cVhi94kj3UQ6SYu2Fg+o7Sy5pf065I3N4iLv6 tRH0pcP2/YRbJ/GNz+vWVLmFsmdtN9OB52OWreSplx3KyThfa5t1LwkGsvIbGX+am2ng Guj1NioU+/IOSiLu4vgI1DvmUUi9/XNUBF+6WoT9Et2PlDwVFSCon75vdWvB6HgeSFi5 e7iqWAaPRe9F0xswDI2UFyjmeTj9l6tXCshvPI7hNhQn4CWpQ9bFdYiefyyXzpedqGrR S8NQ== 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=inbQkmFrOayReIffOd2t6EHAUK/8IyttFQ29GjUbW94=; fh=l5uTnrrjrNjphjoY7KkQeQb6/zKHvtgvTt/4c2l+0Gc=; b=Ffoq6hsFkc/0KoOt5GexEK3g5edYkYjj6pmUtG0GFLRt78YEBKO58XJOfy2+6cgSUh gvu7yYxLPsBCoqDNDCX+wsGd8eExtYN1oqDGmtXRFLEK8KTEzg/p22MxHDfEoIjni863 HJUV2w91DSq+Ey7KEcOEv5HRdKWpGxUP6peC3142tbLUfOsy5gnD6cdKCMPgqEUHUWCJ L62jQo73XVII8CIGNhfigLN+QG4qobeYMbbR9n55PhzXAYY+gvieBa3Hp9aMztKWfP2z wLrIa8XCKwsHDecCf1XMO/uueFUXHNtSgu+q6RU0tfxqtGeR/pOQGWXHy1Axf3kNiE6O v1dg==; darn=lists.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=20230601; t=1771913856; x=1772518656; darn=lists.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=inbQkmFrOayReIffOd2t6EHAUK/8IyttFQ29GjUbW94=; b=KjZzqUMWAo1RKy1IQXPlWDUMFEEB60T6IueMqT7h6z/nTftEfbLXPK/54MxEGZGXQf JEhtodd0x1IqAXSPD7ziE61xwXZ1oV2lqDEzDKuiGMU+POrEmAqAfO3SbbHRy2TDDfDP USkESoZerxIWTyEzp9oyW74haca4fHeAhg4ijigAQcFB1+eDygxKoz+63CwTzj/H9Ji0 C/xKT6hegjwOVze4aEJooMw7hrPvjwghQmu9WkJlQS0UgOPgqIX61AvtXpTl0rcIaJQA Yxax5SfdAtTofWeC3mhrCaOLLm6Lztmfvvm2eilODcT8HQiRY2Z+3FMsNNIr5uh3w814 PYQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771913856; x=1772518656; 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=inbQkmFrOayReIffOd2t6EHAUK/8IyttFQ29GjUbW94=; b=WbIHFDZQea4AL4BF7M2HRFoGhePAMf6GBgn7dZA1ClKLpAxrw8wFzxnFPnEsnvadyk 1D/JU2Qxx+R6i+tbHJPcvlhJ5pCO8EMjrxwhceAoMoks9SaBzZcmZSpf8oFwCZ4jxR7l R6kqq6VhpNf8KOfz0Q6hn/3wVAhpNqGI7zI8UzSENuugOg+sdejt7k7fikJwRCnSGkaB fLmlryonmZEWI5a/AUhOFJU2S2hat4w5rVfTEGIfh+SH31NOoIarogBBbRsWzpeJruVD RWgHAp+QAMz4XxRC+GK9ktCxsphHyvjfPiJz5Wr+tKZq/e/5YziXRg8zvOipCvZiGz9i xheg== X-Forwarded-Encrypted: i=1; AJvYcCUC2KDHEOUpVH1ctL44FpMs+jJVjVivrZNut593JxYoFfHYvKV7Wm4T8q+Qkio1zA+udpqxVK1GHyyB/y5m@lists.postgresql.org X-Gm-Message-State: AOJu0Yzm8NSxIJQTVO9nmoudnthmeL/wG50ldE5nU/t6ekVUHdJHW0Gj NlNvjTXKZTJOEwStZgHB6usol2OghRf+Xn5v4JQ26DrvvZt9dBRXp3AUurlMALb9MQo3+NkeJfm ra+twtqxzlac/9qeLgta2NlcY5iczrxs= X-Gm-Gg: ATEYQzyST+sh2Oc7HDU4lYl0rHJ+JO77oVF+kmIPzsdEyV9RuZUxfFQTi2ZsoHR2UWf 5pmlGTX2wTbaJPlMSr92u/kTFVjbuqeytvSjrEKFlXZPFLNVFeQOrc2rOkNz4vRcD3vzp+DrLfq pZ3HTOIaBX6q0JfN3+zwAcdqnrJdtD4LCflC++8cnqt18QFon/3rQTuSA0HrPxoZa86+sRzZvWt PcLylyKM1BM71ll4Cu0ix7jzMBMjognoAJhQ+lvPoKeCo2FOn4ZbbaWUDiYuL37A14mR+aaYEfu i2Fqkz16tc3nqpufBU9LBQanvSiDebMhU7OihsT7THseOxb3PNnkV0xM5sP+dhykb2xbXOjN X-Received: by 2002:a05:651c:b09:b0:37f:a216:e455 with SMTP id 38308e7fff4ca-389a5d5e984mr33041951fa.18.1771913855878; Mon, 23 Feb 2026 22:17:35 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Tue, 24 Feb 2026 11:47:24 +0530 X-Gm-Features: AaiRm51fyOmvPHpk6P2yUC4D4LPf7xGJytlbe0q37B6y9fvRWMxG46kqSxva3t0 Message-ID: Subject: Re: [PATCH] Support automatic sequence replication To: "Hayato Kuroda (Fujitsu)" Cc: Ajin Cherian , shveta malik , Ashutosh Sharma , PostgreSQL Hackers 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 Mon, Feb 23, 2026 at 6:56=E2=80=AFAM Hayato Kuroda (Fujitsu) wrote: > > 05. LogicalRepApplyLoop() > > MaybeLaunchSequenceSyncWorker() should be called more; otherwise, the seq= uencesync > worker won't be launched if the worker always receives messages and WL_TI= MEOUT does > not happen. Can you add most of the places under maybe_advance_nonremovab= le_xid()? > Personally considered, no need to add within `else if (c =3D=3D PqReplMsg= _PrimaryStatusUpdate)` > because it just consumes status updates from the primary. > I don't think we need to be as aggressive as maybe_advance_nonremovable_xid because not doing that can lead to bload if slot is not advanced. The only minor downside with checking too frequently is that we need to traverse the all logical replication workers to find if sequencesync worker is available. I feel doing in ProcessSyncingRelations() where earlier we were doing ProcessSequencesForSync() should be sufficient. Can we find some cheap way to detect if sequencesync worker is present or not? Can you think some other way to not incur the cost of traversing the worker array and also detect sequence worker exit without much delay? ... > > 07. > Question: Can we introduce an intermediate state, such as SYNC, to clarif= y > whether synchronization is proceeding? > What is the advantage of this? For external purposes, the presence of sequencesync worker, which can be checked via pg_stat_subscription should be sufficient. BTW, what is the behavior of REFRESH SEQUENCES command if the sequence worker is active? Does it still try to refresh sequences, if so, is that required/good idea? --=20 With Regards, Amit Kapila.