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 1vsbe2-009WjM-29 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Feb 2026 07:06:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vsbe1-00EWB9-1A for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Feb 2026 07:06:45 +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 1vsbe1-00EWB0-0G for pgsql-hackers@lists.postgresql.org; Wed, 18 Feb 2026 07:06:45 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vsbdy-00000001BBb-3Qpg for pgsql-hackers@lists.postgresql.org; Wed, 18 Feb 2026 07:06:44 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-c6e2355739dso1779335a12.2 for ; Tue, 17 Feb 2026 23:06:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771398403; cv=none; d=google.com; s=arc-20240605; b=LhMGmd/I+e2EpzotV42YIId7hOyVA5ggT9ngWxaITXI1zj/4rcPl71ZsEaX5dNatr3 h4tyKkeXKoYdtOyPxlSS2ahBIVoUDz58qS5CtBWdQw5LV+tuCmyHoDQWYVFyxJhUwBVq RYuyP4L/a5iLLXSMcLhA1FGD1oEvU7x9HNWZloVFwzGI/ijEG1jAaokojPFPfg5L/Zbf 4BiWTVO81mV1O5XQvWI1y7zmcl0oQt56cNakjzxdhvuUxRFx5eqiXRSJNpqi7jQVkJLy eNk2Ich7AtD4SbEPFFZ9KVGem3hUaOW9Yu2pEMLLBCtSBSrcaK9HXWGGk6zPfpBoUGb/ /87Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=L/v3RtkRbBG+JdBjZsOQklHqmp4D12qbRgDxMrG9mAU=; fh=BbugdE45zllwdK45LCndqmQx8xVxtvqggVXfOe6yGHc=; b=JB5iKzgpv3zfQ1KNZYYejKEVOJwn16B8UH+uYWqadRZfAGeCge42nVKf25U1wcw+rJ 8Tyt57N5HbE4g87w5khhaET5Z7RaxEwDpKw+tuGGi7/EiCMfqYftEK/Wzm8YIbk7mf4D TJ0VQ+MVb0xQ0z2LQissv1TZQvHgKXtQXPTkK6su5c5q5jFij4Su/g6iHLYOLkdTSHvn 5BYrkkIG5DMnP4iuBA+TJHBQJLp2+mxRSLhkKd5l925JfmksBCQN9OljIXa5GQRAdyRC OTv/sTlyXpSgU3t9VZ2H49UI88NGY1iaaYhx2PlNWR6he/nV9Qb5+e4n5NPrCKHbdc45 lNUw==; 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=1771398403; x=1772003203; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=L/v3RtkRbBG+JdBjZsOQklHqmp4D12qbRgDxMrG9mAU=; b=hNaT8XzfP4pIGqkeD9SNDojxjkfH6dHXPxTL8/XNjfpPj0Vq3Te247X+7tbXDz2MZH XASBqM+iDUYOzN1k3t7Ai3N+qGiT4E/O7oBI+lJVh0+28wDJWIql0sgJ2pFtD9KAzCWi XF4/b8czcRNzzgBTxi92QH8H4hAaT842HbPhjlpaJ89RTYJ8K5rh5hKGEkuZTGCKJofv otaxLptGIOvv89XzMHuHXFnsXq34eL5AcSwzEdt+l6+aiyIRbMULBiX2HEJVWmn25V61 hGuqRs2zgu9WXVFyjORNMlFGrba7uFPbB5ICz6W4PkvYu6QIOHdkh+/VEe5BEPVVAFQ0 v6oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771398403; x=1772003203; h=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=L/v3RtkRbBG+JdBjZsOQklHqmp4D12qbRgDxMrG9mAU=; b=FXZ1HtwEvoX65etT1bQcHmAgCevdGgWUG9+6vBV7cyF2jtRndLxq/hWX6qegJiIKGE mvG2/1M3E8qrHnZ2SBm1unixw9LveiBCqBFBmhp9NtewGYLTlp872eLrq8hbBFWB0AAJ l31ykWzDUrUs08gGtgY1jHxpyKbqkeFs0DAWnoWKRBw0tYsd5MwxCNoHi2EieSU6TD2b 5brFVbrh3pQfduBeu59/DhgEXP1eZQYWbX7O2H7ZIezIyT9mGhP6Eveuq9Q8SsYNOIAS bNqSjyFTEcimmooo28BGigqpuWpgWQ7enXKS7A81s1xWJZxIFRTZ8v7QCzWMLBLj0/dN xfaQ== X-Forwarded-Encrypted: i=1; AJvYcCVfDybIomHj2mw06My66c2vSzVA5B0aYGl73YIGx/iRWHeEWvHy5NHGJsq3YZ7zp4PqmleMFGim1/rRnb0M@lists.postgresql.org X-Gm-Message-State: AOJu0YybAm7bm+LXehhpk54UusNFCrZlLKn/NqDaH86MmvGV5KgtDWlq KPUTQ5G7wWOfY9pa5dz6pOxL14UUo9ZnuMJsqQGZBKf1+I6UE5vGUA0+Xu6glcBie+QlxFfm+TE f+z+VbHYeZZFww+waZzHL2nWJLWaiTA8VYdZO X-Gm-Gg: AZuq6aLnPCg77Zec5KXy0fx7DZr7K8B7M+YJfdNiIc/dyDADwuSdxucxl6mCpM5Mzm9 iDxqSiBUnl4jUIx4skPH1P8+FfZ90MUQJ7AuJ25tF2izyaRpxWBSHtzRH4dD8KAQttxBVZA5WR0 fKVCFir7MqEHa00TITm0hdJIdze2bC4dcC6kjXNwlBldvsSyDOnWxTNaycpsdkGxcg+hoqDrFRw TuygYyu/OY/nkqbvH16d25M6ugJZLGI8Wu82F2U0JESCLqgQKDsIr5mg/UbqvrzrmRpFcpCSa4Y VJ6K8HGqc1md/Z7yQzKw+eoWM17KyBzd/gMwdxWjE+lD1b2122e7RG3gpLBP2kmOu/z+WqyR2pd F+Z5Jypa5 X-Received: by 2002:a05:6a21:1391:b0:32d:a91a:7713 with SMTP id adf61e73a8af0-394fc2e2cfcmr862981637.40.1771398402655; Tue, 17 Feb 2026 23:06:42 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Wed, 18 Feb 2026 12:36:31 +0530 X-Gm-Features: AaiRm518rh-AGrETOhrlsDIQc-xTuSNndkfXpVgs8R_N5m5v7np1eCkZ28Ymj-k Message-ID: Subject: Re: [PATCH] Support automatic sequence replication To: Ajin Cherian Cc: Ashutosh Sharma , PostgreSQL Hackers , Amit Kapila , shveta malik Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I tested a few scenarios on the latest patch. Sequence sync worker did not stop in below scenarios: 1) When the subscription was disabled. 2) When the only publication for sequences was dropped from subscription ( ALTER SUBSCRIPTION sub1 DROP PUBLICATION pub_seq;) 3) When all sequences were dropped on sub. Application worker stops in scenario 1, seq-sync worker should also stop. See maybe_reread_subscription(). We need to decide the behavior of the seq-sync worker for 2 and 3. IMO, for scenario 2, we should stop the sequence sync worker. It is of no use to keep holding one worker slot when there are no publisher publishing sequences for that subscription. For scenario 3, it might be acceptable(or may be even expected?) to keep the seq-sync worker running. But the challenge is how we would distinguish scenario 2 from scenario 3. I believe scenario 2 will rely on the absence of sequence entries in pg_subscription_rel to sotp seq-sync worker. But in both scenario 2 and scenario 3, there would be no sequence entries in pg_subscription_rel. Given that, to keep the logic simpler, we can stop the seq-sync worker in scenario 3 as well. This seems like a corner case, and it should not cause much harm to stop the worker and restart it later when needed. Thoughts? thanks Shveta