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 1wcsQb-003ikA-2J for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jun 2026 22:20:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wcsQa-007ekT-1x for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jun 2026 22:20:08 +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 1wcsQa-007ekL-14 for pgsql-hackers@lists.postgresql.org; Thu, 25 Jun 2026 22:20:08 +0000 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wcsQY-00000000FQo-2m6V for pgsql-hackers@lists.postgresql.org; Thu, 25 Jun 2026 22:20:07 +0000 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-517654b8e28so2323681cf.3 for ; Thu, 25 Jun 2026 15:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782426006; cv=none; d=google.com; s=arc-20260327; b=qy30y69dkm/V/xgejQapIcBizmInhCsOVS2IbInC/oG8ANpibjsjsV3128vMB5nSkV 3M1QwdBiqT9t803HMx0HWQfyvCxt2WjnI6GoKKw1kfMzm/COveBAF6+T/u+m7Om7Yab8 MaF87NBzQDt+3F303zZ/kcFiEA7TApQwfRyYjBiiBVJPl68j1AxT683plmEMuVuEIdUu TNoHRee429ndnwfgvmVuB4d/SRbfehA3eR4eU1DBTbYea5i2JL8FCXznxgzcdfgZ/dZM 5kMr3zD09oiuwh67+6TYzh5ccr5HSgHhTe+rQ2q4AEF7jxSgLVNDRu+iaeBYxKRJ+ihk tkeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=5kizb7G5xXzXG/VrEAjKLI6Ifu4ye3gahY8izgQEX/Y=; fh=PnOk7+UDmJ4DVUtTV3E3M3h9qbJswshMAk3PCMo9qiU=; b=i7m8ndshi10E4f6mjEP3U1mXo2mqj3a6uaYPrgrs0/H+KJhJSOqLBk7SNSbbb5kriJ QSc42deTmIvUoqzEvBhr5N862/Fpm/HAy/MA5bb/zZG1eMAspNRNubpWEGxS0v0UAtDh 5GRQ0Ta+jAqy/QBuBX6CJ9dimN9LdxiaAK4ajOocPOuUim9Fr8pS/eB6cqEmIpRhhlD0 90ud877e6cyk/9nXVK/OKpXU4sdQBG5dlbPqQx33odl4rKO5/e1JpfFC+wX8sPP8juDB nYLoWqHixddjSwhWDQZ4Pp6sQMq3C5DZw7RESoZRc+hSxvfKYji7VTVRSRDQ2barZA6T 1/jA==; 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=20251104; t=1782426006; x=1783030806; 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=5kizb7G5xXzXG/VrEAjKLI6Ifu4ye3gahY8izgQEX/Y=; b=p9rRauC8VXx96UmXTJD5RXBLnEmKsL+4kLTLC6fwXOBx6j8bRVE0n3rHjci8P6MuBF JLuG7kIug9t89AkT08A+aj0aoBxbrWP/21FFTmz/Q94PYhUpTIjH5oegmZ28XJJXkX4o dYmLi9Ps3/VCUOC8G0WVcFsgTIAQGdC90fMi400MNKAUWPJOYmF9mYSAXiFhZm5BXLhx RPdb4lY/h5tQDyR7ZsOq1kUoY18BTTD16oEz0yW6KuKCGvJ/HoDRZRGi7r9/vc0EKzvZ /4PguLxoY/jbeDpHKPuCuI2gYqqGahBDFizLclWrRV3CcARpTPG/smMHcQ8aXqguimKA +9gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782426006; x=1783030806; 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=5kizb7G5xXzXG/VrEAjKLI6Ifu4ye3gahY8izgQEX/Y=; b=s8ol+lr18pBwhhsJ1f1A653+/EeOD/8sDcowXcee8XZyEW1MQ0rhA4K+0KbFYVlHnC LPuikLj8EA4ol2ooRJdos2sd08rPNSlPlCszmo14fv/E3md5ZFjLhcjHF05pdJK9zN4L 7bWDFCSLBSHQ17BAJ9blYMmkYJ2Q4RBIRNFdAAf5w79jqOD/aqRWpQpcC0CPCisMX7MD hw3i2qlUzWWV0cEkAYKyMS7MSjdSbYgGayrMi9hXmyaj7gTATCoGyq27l3Np+GUmWF0Y KBvBaO4/0TCTIcK8wmuCIQvmtzPNeAoGV3UrH7gzgKo65XdUDfP+6Dkd1oSrS8YHGwBL jgow== X-Gm-Message-State: AOJu0YyV+LKOokkCYBQh9HTiGtpi17syvt9OBHYqd6Q8eRYQSxMVHifY 4ryKM06aVSmKV9+SOVu33gP7T7mrUyN82Ev8b9eOUNf2n57pjS5UmtQGniCU5HizLHtLtxCZubU FJu9vNg4+ZpTCAtiAnjLR8Crf6bERREA= X-Gm-Gg: AfdE7ckr6nrPF4LjAzsI5fL9GZ910NXEgc8bb+jOtNK0VR1081fmPSSwdgLyb9oVonD VtN9mR6amCk1u+PbEvYz0tJQQdpJknffip2mTg5fra7NFwnV7ykUfiIDH04ru1+hbgsTIre9Y0A JL+7/3de8EwyBCEQLB6r9sS/JgFTOeEJVseG8lO/aUZIbCyoYdwLKnX/q8Zx1KwZtapojCP8Qy6 yhkVsy4p2UHol+pImtUY0z9X64bg4txM1AEGJPH0hHF0qif/Yfx3QAo6b5T5p7sMVP25sR1tw== X-Received: by 2002:ac8:5946:0:b0:519:8b76:2ce0 with SMTP id d75a77b69052e-51a72a76034mr60153631cf.37.1782426005655; Thu, 25 Jun 2026 15:20:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Fri, 26 Jun 2026 10:19:38 +1200 X-Gm-Features: AVVi8Cc4DOpQRFUjC3i1OBkD8vqx-vuJ6rCTCMtj-3hwPQJhBsebfPuaiHrXPqQ Message-ID: Subject: Re: Include sequences in publications created by pg_createsubscriber To: vignesh C Cc: 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 Some review comments for v3. ====== doc/src/sgml/ref/pg_createsubscriber.sgml 1. pg_createsubscriber creates a new logical replica from a physical standby server. All tables in the specified - database are included in the logical - replication setup. A pair of - publication and subscription objects are created for each database. It - must be run at the target server. + database are included in the + logical replication setup. The + publications created by pg_createsubscriber also + include all sequences, allowing their state to be synchronized after the + upgrade. A pair of publication and subscription objects are created for each + database. It must be run at the target server. This is not properly distinguishing between the internal publications versus user-nominated publications. I think it needs to clarify up-front that all of this "Description" part is really only talking about the (default) behaviour of using the *internally* generated FOR ALL TABLES, ALL SEQUENCE publications. e.g. "All tables in the specified database are included" ... that might not be true for user pubs. e.g. "A pair of publication and subscription objects are created" ... not for user pubs; they already exist. ~~~ 2. replication setup and pg_createsubscriber is how the data synchronization is done. pg_createsubscriber does not copy the initial table data. It does only the synchronization phase, - which ensures each table is brought up to a synchronized state. + which ensures each table is brought up to a synchronized state. The + subscriptions are configured to include sequences, but sequence values are + not synchronized automatically. Similar here. "The subscriptions are configured to include sequences" may not be true for the case of user-specified pubs. Also, (from my previous review), subscriptions are not really "configured" to include sequences -- if they subscribe to sequences, that is only because their associated publication is publishing sequences. ====== Kind Regards, Peter Smith. Fujitsu Australia