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.94.2) (envelope-from ) id 1ueADx-005ojy-01 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 10:27:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ueADv-006TCx-5S for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 10:27:51 +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.94.2) (envelope-from ) id 1ueADu-006TCo-RR for pgsql-hackers@lists.postgresql.org; Tue, 22 Jul 2025 10:27:51 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ueADr-000D0G-1i for pgsql-hackers@lists.postgresql.org; Tue, 22 Jul 2025 10:27:50 +0000 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-b31d578e774so4155973a12.1 for ; Tue, 22 Jul 2025 03:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753180066; x=1753784866; 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=cykoKZBYrxy2cqAVcev4+TAxrFVp1K5jlJ28RPfgXiQ=; b=WMLQFVVQdg42hRykv1uGQcZFh1w5lYKykSVizhf2Q7jPl/VSfarfEot1QiOBsTdyrG wGNLpr3d45geARsduFQq1Yra4O9hKjRMrl5weTT3OqJHG/53ZiV3a+sC/BoDgWu7UNc6 QHtAPzROSm1OUl9QjDf5/PT5heTVGwW1V7aUG+QzfRNFWF4F6HVVhC0M0+iMVl/23mPK R/8oJim7Zet2QUjIkznGd8TyJqvL1zudji+qeRxG6BFgvXSai1YDwgAjO1u9FtR1ZXMK 8BlGtdG6/+iSZOuA5rNKzj5Yi+LqTtuVzuioFqHDFNXIKRr0fY7SzGCLly6/G83PdWap 0MWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753180066; x=1753784866; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cykoKZBYrxy2cqAVcev4+TAxrFVp1K5jlJ28RPfgXiQ=; b=cXlr+TKgGp9OpSKY760hVV0Nj5nnOfcGbCb5V2+UFkxAjy43yn/V4uI0GGv/4pck7S Stt4ct4az1z0HlNFJH/Pwsdw+zHkWsOyqakyLQ9enU+hI9OTkJt2jSDSpvdoqXoaVoeV PgJ5Cj9a2DCIX+oG94vsNc5QVycgbVLWP0Gb1l+VlVOjDeZSksCFIp65lPGHRRPhV4uJ VKWi5AKH9RW1GyZGjYB0EJi4hz8Y/rflNnjDXYGMFEiqP2zB+PA45eZy0tu+RPTe4FJ2 WHOmEJIL/iQLBACmQ/qEO/Uz9HLuZUJ9XESRPjRpiPz/IOH3VMtv6x9MJEwb28m8EgqV Oh9w== X-Forwarded-Encrypted: i=1; AJvYcCUK2cL5DZhr86zexp8EpPZ4/hXa5eH6zo4JAhJ5ndYfmJbQv502QKx/KIJFVA6IJXJZnUIuQUkgPHVKdT7C@lists.postgresql.org X-Gm-Message-State: AOJu0YxtHzw1m8fm4aNuLJA3+r9uY7S3/ZTrtRg7F+FIUrYWjyWEOGx9 VTLawC3ES/O0F6fbqTu4w/kAWRCLAsh/vASaxNeFaf/+nsER/Pv98keLZQK24V4Q79N7F9TtRSZ STH96j04uRqkXtHUMDR59tGz9Wx6k+to= X-Gm-Gg: ASbGncu8FNxEPXwUk9vEYhuZFyh/9snZt4t/LDa6kWc7RKPDh8/NmD49r7O1aqgmrEu SWtu9DaikApHrGjWimG5JvitsM0M96zGL6J+V6oJSgKS/mD5l15xDyVMFMOo5srwrpTMxvSaJT3 wx0vVUjFkAr6EjdW/hZ1k/uHTAE5u0ayOLRyWNcAykjpP1jelXb/utNJY1mRt0u3ohiMGlPdQZ7 9AXFPkTX90iR1xC7OHc X-Google-Smtp-Source: AGHT+IGV69hOHSM+oEza6ianilSypbK+OZpJiUH7GFeHCJWczwbByiNYEtw8KXxGoMRuZ459CEkEIoGfD2yRozrLp8w= X-Received: by 2002:a17:90b:528e:b0:313:17d0:b066 with SMTP id 98e67ed59e1d1-31e3e12f7e2mr3866345a91.7.1753180066081; Tue, 22 Jul 2025 03:27:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Tue, 22 Jul 2025 15:57:34 +0530 X-Gm-Features: Ac12FXytela5REGxGs-jDJ8UpeDvcGe5J-pACvNw5THqW0IH0dna3l5VGEf9NAM Message-ID: Subject: Re: Skipping schema changes in publication To: Shlok Kyal Cc: Peter Smith , Amit Kapila , "Zhijie Hou (Fujitsu)" , vignesh C , YeXiu <1518981153@qq.com>, Ian Lawrence Barwick , Bharath Rupireddy , PostgreSQL Hackers , 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 Shlok, I was trying to validate the interaction of 'publish_via_partition_root' with 'EXCEPT". Found some unexpected behaviour, can you please review: Pub: --------- CREATE TABLE tab_root (range_col int,i int,j int) PARTITION BY RANGE (range_col); CREATE TABLE tab_part_1 PARTITION OF tab_root FOR VALUES FROM (1) to (1000); CREATE TABLE tab_part_2 PARTITION OF tab_root FOR VALUES FROM (1000) to (2000); create publication pub2 for all tables except tab_part_2 WITH (publish_via_partition_root=true); Sub (tables without partition): -------- CREATE TABLE tab_root (range_col int,i int,j int); CREATE TABLE tab_part_1(range_col int,i int,j int); CREATE TABLE tab_part_2(range_col int,i int,j int); create subscription sub2 connection '...' publication pub2; Pub: -------- insert into tab_part_2 values(1001,1,1); On Sub, the above row is replicated as expected in tab_root due to publish_via_partition_root=true on pub. Now on Pub: -------- alter publication pub2 set (publish_via_partition_root=false); insert into tab_part_2 values(1002,2,2); Now with publish_via_partition_root=false and 'except tab_part_2', the above row is correctly ignored and not replicated on sub. But when I try this: insert into tab_part_1 values(1,1,1); insert into tab_root values(5,5,5); Expectation was that the above rows are replicated but that is not the case. Can you please review? Please let me know if my understanding is wrong. thanks Shveta