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 1vtIuc-00FTIX-1y for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Feb 2026 05:18:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vtIub-006VyD-1L for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Feb 2026 05:18:45 +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 1vtIub-006Vy5-0R for pgsql-hackers@lists.postgresql.org; Fri, 20 Feb 2026 05:18:45 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vtIuX-00000000KSM-4Boi for pgsql-hackers@lists.postgresql.org; Fri, 20 Feb 2026 05:18:44 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-59dcdf60427so1824060e87.3 for ; Thu, 19 Feb 2026 21:18:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771564720; cv=none; d=google.com; s=arc-20240605; b=FMFZ2mieCW+QRDVeOEUqVBfkaqE3/080oNXgrgjAhFYBJBoDlVcGe1XDBP3oS4ncH9 QRc+AHd+ZLZvqjgYP1HNnYVa4KjQ9NM69Z53K84x+OKrgJt6L3IRw3eTvJjnu0VoVgji sTR4Kp8LLWD1TAUTTC2W45wYPQ7gCe/LinCjzZoXPnmyMGR8k2z+irOhq1YGQmInYsxB qCsYVCPIwmJXfjT60UMtzgMiMGpc9NImbBxarE2Flyf6lsaOH2hRiozAuJlB46tXFI4/ pUZ4bxi98oZxwK+gda/w/YIcIerx1L3o02/z2jKxGjvdKkeewb2x+Baf3T0uJefrkQQS uZ+Q== 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=amOpIC+x8Zze2RIEgvwnDmeLBH87GEEr+ZFIjj92PcM=; fh=AEkLlMQ0S/qH7JfVxb4tpRPWv1qlfwK9YHc9MyR4gxs=; b=CSPJhFU6HZm9cybecrcbGd0JnN2GAvVhssEefggXA5GDcs5Dlg69HCZ+6hnssd4B3g rgV9cFSsEfJQgemS4J7886UppE9AzY3JmfnDpABo++37k6jwOmDkuLtVb6Yv4QvYPnsW L33aoVDk3pDD6GmH5APaeHC+5JQCgH21Myn19Sbi+i3xIMOt3QLG3ifxzrYXWElFnpIr b6sY/OnA4QBPfSK28MLQc68CspvpBSiEINCyKR5QCgIb8J4uTRi3Dg55LqEaqSLJVXfP jwvIiqKlCbH5+Thj55ZN8o+muMOOKFtJXFQn7VhRPFEr+GfuQSHzEqDaSfw2i1ny5TL6 4YQQ==; 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=1771564720; x=1772169520; 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=amOpIC+x8Zze2RIEgvwnDmeLBH87GEEr+ZFIjj92PcM=; b=hqz3K7KZQLZSpX/qGWP1YeuxFKeu+Or0JrULPvCIrddpKWx8rkbo0ytrP5JMjQlLUs OYNqBuyd+hqv0VQIjRl+qPgou/emTAinmNpwPZ96SjVizI2u1t63UFweqoDB7Mopd+// TGtAhvXMFBP/nKxxnYQiRaXVVFPGfbJXn/sk1UugJu+Ak3hyxE/BSkP7cRNFnsmu683c LAkuDMLVBYhcQeyKKxBW2DxsHk1JF/N0Kd8EI4uRi+jXsU21Dg3o/wTVX6btqBu1AWll AukMRxLLWYAHtcLaELQNfOeLhSDHpCuYh96mAIrmf/OHa584yljaUvZwzlEC/F++JrYU Bd0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771564720; x=1772169520; 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=amOpIC+x8Zze2RIEgvwnDmeLBH87GEEr+ZFIjj92PcM=; b=rB/SxhqJrvL/M+1Us483PPY98iDi7tw6Bo9ExLRZEfk/3G8UdtIU4uT1lHg/U0Cvvo D0I4pPd1GdlZTWV6EIdiLKnBvZAxjVXjxze4S64hxd8MDXOSnXp735JHhKKo6ZV6g6BI i2b1XzGXpyFzxhXn34BhW3GvhTwentDVSH4FGR1xeAmLVt++0JxvsjzNUoO8KpwPn1Bs VPf+yZCRwmnH6rKYtRp10tO6ddpWvthrIX7KjBBrFjUglP4gLNAntdAjtci0PwLy+5Ny QZZNv1IO6yYZlgjXk3hr7nccOjajIxXOwXYfpvjefSHGYNpjlfB6KwZvKXEp3r30YKZ9 TMdg== X-Forwarded-Encrypted: i=1; AJvYcCWFZNxI4pTSjSojAAZz9GWEbBrK+4FU/3fug3oRopWtDvUoARhNTbdYiL/LNpXHzZSzQFtPuFB/kuWBa6I2@lists.postgresql.org X-Gm-Message-State: AOJu0Yz4kYin8BMuQO/CwDNLPlaIAIJ+tWgoEUxSBTtwLG7h1pMXz7aT 4mYb751FgRrXJWihLs5X9b/tEmKS+1w4PCQgi8JBoPwhLQ+kHBc2p/eACTLjlu/q9J3xTdiqUls 9F+l0hDdiA99cdmDDdPZJ9Jxo5bB50Tk= X-Gm-Gg: AZuq6aLN5eYZvbAnIU+zRDXToat2RRMT9uyQdPhlttnPhNJoAXvvllDYbIPkIZZNhtb RNKh3XveQ0DZjGrsNzwVsESLvv2yMkPbJFbYQ5T068Fi6bLWbywYr28nVyXy/QirRkYGX0B2OoM l3SclqnqZaOfBss8IVkrJAcKEDlQDWtz9qNp0mJRwSJTdW+9X9JdPtwy2NiV/ZUydYwCYOIgSTf gQbgyJukbgO75ndC4s30YSk0vU9qsE52tlIZMvNaIDovtzUGeFG8/bjW5ka0zBUkRX3suIu7jbA PFl/im+ioKz2/fZVqez2hCKRZzZ9ccIrQ4Vv8Zw1MpXhZ0bcXazg74MBJIW2rSNHNukq1m9u X-Received: by 2002:a05:6512:ad1:b0:59e:4f92:5df3 with SMTP id 2adb3069b0e04-59f83b8e92bmr2373389e87.10.1771564720267; Thu, 19 Feb 2026 21:18:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Fri, 20 Feb 2026 10:48:28 +0530 X-Gm-Features: AaiRm538X299CnOquJmyiIfKlQXnpxEuoaOPwiv05QJqrmOIYNwjc2O139bYAZA Message-ID: Subject: Re: [PATCH] Support automatic sequence replication To: Dilip Kumar Cc: Ajin Cherian , 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 Fri, Feb 20, 2026 at 10:11=E2=80=AFAM Dilip Kumar wrote: > > On Tue, Feb 3, 2026 at 9:18=E2=80=AFAM Ajin Cherian w= rote: > > > > Hello hackers, > > > > I'd like to propose an improvement to the sequence replication feature > > that was committed in [1]. > > > > The current implementation synchronizes sequences during initial > > subscription setup, but the sequence sync worker exits after this > > initial sync. This means that as sequences advance on the publisher, > > they drift from the subscriber values over time. Users must manually > > run ALTER SUBSCRIPTION ... REFRESH SEQUENCES to resynchronize, which > > requires monitoring and intervention. > > Thanks, Ajin, for the proposal. I am trying to think: what is the use > case for automatically updating the sequence values? IIUC, the only > use case for the sequence sync worker was when using logical > replication for an upgrade; after the upgrade, you should have > up-to-date values for the sequences. By adding an automatic update, > are you targeting any new use case? > > If we are still targeting the same use case, I=E2=80=99d like to understa= nd > how updating the value at specific intervals will improve the user > experience. > Even for an upgrade, to avoid large downtime, it would be better if the subscriber has the latest values of sequences, so that during the upgrade of the publisher, the subscriber can receive all client requests. It is possible with the REFRESH SEQUENCES command as well but in the worst case (when there are large number of sequences), it can take much longer time. --=20 With Regards, Amit Kapila.