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 1voGR6-00034A-0Z for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Feb 2026 07:39:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1voGR5-002avP-11 for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Feb 2026 07:39:27 +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 1voGR5-002avH-02 for pgsql-hackers@lists.postgresql.org; Fri, 06 Feb 2026 07:39:26 +0000 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1voGR2-00000001KAz-2pgG for pgsql-hackers@lists.postgresql.org; Fri, 06 Feb 2026 07:39:26 +0000 Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-503354cb21aso3919021cf.2 for ; Thu, 05 Feb 2026 23:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770363563; cv=none; d=google.com; s=arc-20240605; b=G6hdRpWQp5JxUiMHV9Aj6k/W2I684D7sUbiVPT8JmkoazMwwZnv4gtpYpwBhoaLvl3 U53fwLzEzWCiHNhcwmXOJbkpTG9p9Bu6fYToSCuH3o9KO3ud+ItgPbgMI8LK1NTWlKDy 3ENcD4fxI1EpHMNk+TZMKxSD8Q31jkFX/O66W5AOSlYgx5TF4paFgZT6fUyJiP6VxL+a hCJGJEModmLRDg1UHB0zW4hGbETMIkxu91LJjBxLR9VeD2uPT5Ye0Pe5T9plwReL5sgY g5tGN4E/6UslRq/BM4ee5kExukzCon47HcmTxe/dWc2nLMWEf0koFkN77sVvWRhExqoL Ox3w== 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=Y1lp9cMHrOj3x12f8citqKBgDSSdp6hKhbqgELOIppo=; fh=IU4kG6q5dUibFW1ifUp9hL7jKn0I7H1aoyBplprqbNA=; b=ZAEpeIPL28BdbPdo83qtNpXObK8pSQg76+zP12UxaWB20c7hQKM9hoTnpHDbAYGtuA F/mIiaRu86iYP3NqCxDEcCCVD+cwHJntOoDk+Tkncu8b/97cqkNIddTHUG8R361Xmh8e HOwHt6PDIfdrtK2eLrnhWUZ35F53tPQ3rfE0lg/1Sx0G1xqqk+jOHIVrk61ot8VnpgPN QoJfwA0VWZsoIQ1eR3hM6VeFlkJp7fgV/zR+0dhJQglb3LdVZ0/TVqa+EwzJ4aTcT2D0 qJobnju0yPUyVqiJ5Iiji+0eNHX/SL3zcR1IPirvbbCJYU/NYz8vq+/uYkymHjNO68FF K50Q==; 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=1770363563; x=1770968363; 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=Y1lp9cMHrOj3x12f8citqKBgDSSdp6hKhbqgELOIppo=; b=duEtjBMe8YzCJapYSXlOqsaz/Z7kajQNzTSmK95WHCUHvBdO+DfN/RB97DVK/tnJ0y ZDsodyk2psJU6ifSsU7z7Cs0GZJy4EgOaJVAUtuKk71+QTTNxvSMBGJu/gD5/aKJkyuS Zx4ABCJDHRP90qZV0ahY9WLlyg3HF12jD0HU1p8muTceVeedN4sQbYQKHZvxjWPPJiLJ 2UJgAfrLVoJPfyek+9BEwbjsF73HL90leOIRWYNjOVhpnAZpZEHdOZ0cG8l9CXB5dWvq P6jPOMXQ+Bweab6J8pOd45k8sUSkA+zQZ02FtdBi1JQ3cOtsseudN+VIR+LaRaXcNDaY vb5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770363563; x=1770968363; 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=Y1lp9cMHrOj3x12f8citqKBgDSSdp6hKhbqgELOIppo=; b=CldA/QyN1QnI4O9ognrfxZ7/zo2/P9Lxka478EZlN9GX/FKeYB60Gz155IA5XmpE3q 19s0ir1jTl4H0xMJ6+L0zgajsb1ZcxsiTpmUKQE2HDrnjj1e3TaV/77vwAuxx3yqAW0K Mh2e81lfoeVMFgG3PDcuklGv5XKrnyKQS3seapipqW8mLJqF2WVDirJChvwQl1HkZALl Mp8Gjpltf9gLTrYWRDc3z984wSGhaWaNrYMyckMf21ygQHyzV4p9iTT4ae+I5OOlDQZp BNe8m6F+wBK2D03q2i9h8P87hW2YECPzzaX/GiQnnB7ENy9ceR5v0x5NnCQC90vLE0P1 2Yxg== X-Forwarded-Encrypted: i=1; AJvYcCX3BeNWJQhHy5zr0uRMeJjO9vGbqzMBfhZJcqzUZ9atJ/dyc273NZOpJrAIFz+1+BxXtiTO3cP7hghErlUX@lists.postgresql.org X-Gm-Message-State: AOJu0YzCRwQL+Wm8/5nGjZDImm8mNqXIrVJPclgtFmdgrWQAwXb19CDm 6ucRLWJnYWbSCM7RY0OvHqIcm9NgbIN9TYV3YODFUEcEoCbo6CJkSm4mz/IcMru9X5OgUonwoMu wuWYthbmmTcJ++PPeCQV4rHlGIVy1Tys= X-Gm-Gg: AZuq6aJoSds6abSDrlO/9uUnaKfQ1wCze6rTD2i2/isT4VsHCMd7tD6xdvIsuTXYI0c ZIckwA2Q0gO7y34YbdEIxfCiTlUkPM3ml1bQUldXE0fe1rzlG/aOAe53k28eCOjnUWJIH/dbBne VgNfYtnqsksSI/K8bJdOP0SDr3cTsm6siew1REII5z8iHY57waIeMET+oyrhfV19e4osi7Yluh9 0odF0lW7HF6NsvJ3Y6u1IXZd5xLCRu81l0BDu1BT3u3Dm9nOC/a1lERsViLyATzvv3/7sf0xfX3 7yhceA== X-Received: by 2002:a05:622a:1890:b0:502:99ce:c66c with SMTP id d75a77b69052e-50639a37b4fmr23962641cf.81.1770363562532; Thu, 05 Feb 2026 23:39:22 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Fri, 6 Feb 2026 18:38:55 +1100 X-Gm-Features: AZwV_QjopdEgAYCT_cJEcVsluoSbMl5nNV9edXVd-lEPVRZkStRR7FMZe4A62Yo Message-ID: Subject: Re: [PATCH] Support automatic sequence replication To: Ajin Cherian Cc: shveta malik , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Ajin. Some review comments for patch v2-0001. ====== .../replication/logical/sequencesync.c copy_sequences: 1. + return drift_detected; This seems a bit strange. And it is not doing quite what the function comment says it does. I felt you should have another variable like 'sequences_copied', which is set to true only when that 'batch_succeeded_count++' is incremented. This is what you ultimately want to return. IMO, the variable 'drift_detected' isn't needed at all. ====== src/test/subscription/t/036_sequences.pl 2. ########## ## ALTER SUBSCRIPTION ... REFRESH PUBLICATION should cause sync of new # sequences of the publisher. ########## # Create a new sequence 'regress_s2', and update existing sequence 'regress_s1' $node_publisher->safe_psql(5. 'postgres', qq( CREATE SEQUENCE regress_s2; INSERT INTO regress_seq_test SELECT nextval('regress_s2') FROM generate_series(1,100); -- Existing sequence INSERT INTO regress_seq_test SELECT nextval('regress_s1') FROM generate_series(1,100); )); ~ IIUC, you are no longer sync of testing "existing sequences" in this test part, so you might also want to remove that comment and INSERT for 'regress_s1'. ====== Kind Regards, Peter Smith. Fujitsu Australia