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 1trTu6-004QFd-IK for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Mar 2025 03:34:10 +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 1trTu5-001l5T-9U for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Mar 2025 03:34:09 +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.94.2) (envelope-from ) id 1trTu4-001l3i-RF for pgsql-hackers@lists.postgresql.org; Mon, 10 Mar 2025 03:34:08 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1trTu3-001xJ3-0E for pgsql-hackers@lists.postgresql.org; Mon, 10 Mar 2025 03:34:07 +0000 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2fea8d8c322so7519636a91.2 for ; Sun, 09 Mar 2025 20:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741577646; x=1742182446; 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=pbTr8+Y9lv5YC+8BnozyZX7WRbC9KfZ9MelW6yhINfs=; b=ZoVL/yQLPg7EiRLnMfDgRzYL5Z4MB26SkAIyVMWmUnRnbn4vIfGVYCwNMFB4B+BTfK G+87AMy+F+W5G4FnFdrNITdvCL3wlccBd77C+S2nuUxZIMckOPeg6FLJMGwS4brUs3Gg NpWmjFjTngTT6LlyALQ9X49ebt7/iggKK4p+CwLX4ysAPZR03DA9uomGPSQ1HzI10Egd Ge9vxmL/50YUWxdCggD7fHWg8V5wJBcLsfI9GNErbDhy2rA93DruVUXdarA74H+ajTTt N/uHTELmWvVDDtbVN714z8Z9wt9c826bWQ5Y/iDq+/5dhKGhgG0m8boK1oTzAcNKw/8I QkEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741577646; x=1742182446; h=content-transfer-encoding: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=pbTr8+Y9lv5YC+8BnozyZX7WRbC9KfZ9MelW6yhINfs=; b=cvlkNQxv1s6e1C9YjpQdcfaFBgMVI2MQIzPhHsSwYZZQBr8u2cjWb3RpetlQ75KIiR iCuMZIluzqbJHSf+S16SK04xByDb95edSex9tPV04dbiv3zM8ZE0YnONsybD7HbuL220 VFrPE3LA93dA2z/N6XBDFOSo5jE8dwtKgXdgscGZlfQziz1nt7Dt6BzuKT3yQZCKkDX9 pjEQVlDQtOQIHZuu5iHtKW9b2CSQGxEsVLfdpvKJEAYRBrUIwGpuuuGbT75vG/b3BJeY h7wSWJGhdUsnkh2Nwpow+D4Xth1e++RFnfMumAJvmUIvzYKrNavQh67utY4vKi8DRg7S w3BA== X-Forwarded-Encrypted: i=1; AJvYcCVQ1PC3+JzfWycEXKLyGrCeMTZoEErNV2CpuLvxGqOHOvVlTvASVs5N9SGNwgCuXnAAysFJ1/OnsK7JHUJu@lists.postgresql.org X-Gm-Message-State: AOJu0Yyi4f0zQNNkoC1Y1zYmuCPAjPCDIjoOojRmNuA6OEsAZxNVWmK5 sjIGzaHWjatzcbvFEpp3ZNN2aqj8cUIWUd1V1qGQUGSVqUq/jHoY1tbicZEXkLp9u8dLJH/KChF Vwo2nN/z1dpMiApqETN7ZGKws9Vk= X-Gm-Gg: ASbGncvcKsVx8oipf3dLJYrXcCpmBxl0RmHHi80/D0TXfPXfybQaKou5mgES9ysTeAC iaxzRiNvWUA1z6t+0r6H3//AD/4ZKpG9xEMrBbwan6MNOPQ+J0tYayx0m+71DH4Mube10nIxx5Z yaep4C+uCPptjr+Rpv1Tq3Zj6iif4= X-Google-Smtp-Source: AGHT+IEjk4BW4cgQKhkeU7dBNGDohtXNPoid7yeCca2bI+uh5XnQ21cgDjb/tsVR6B+G+ewi15nyRf0OTwXgUBjHozA= X-Received: by 2002:a17:90b:2782:b0:2ef:2f49:7d7f with SMTP id 98e67ed59e1d1-2ff7ce938b6mr22543074a91.18.1741577645952; Sun, 09 Mar 2025 20:34:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Mon, 10 Mar 2025 09:03:54 +0530 X-Gm-Features: AQ5f1JqIl35F44WCMXFWYBLh2D1f3rytnfwmNJDqJ8bk9Iyi3uN0LA2tggVroK4 Message-ID: Subject: Re: Add an option to skip loading missing publication to avoid logical replication failure To: Masahiko Sawada Cc: vignesh C , 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 Sun, Mar 9, 2025 at 9:00=E2=80=AFAM Masahiko Sawada wrote: > > On Tue, Mar 4, 2025 at 9:04=E2=80=AFPM Amit Kapila wrote: > > > > > I see the point of adding such an option to avoid breaking the current > > applications (if there are any) that are relying on current behaviour. > > But OTOH, I am not sure if users expect us to fail explicitly in such > > scenarios. > > On the side note, with the patch since we ignore missing publications > we will be able to create a subscription with whatever publications > regardless their existence like: > > CREATE SUBSCRIPTION ... PUBLICATION pub1, pub2, pub3, pub4, pub5, ..., pu= b1000; > > The walsender corresponding to such subscriber can stream changes as > soon as the listed publications are created on the publisher and > REFRESH PUBLICATION is executed. > Right, but OTOH, one can expect that the data should start replicating as soon as one creates a publication on the publisher. However, the data for tables that are part of the publication will start replicating from the point when the decoding process will process the WAL corresponding to Create Publication. I suggest to add something for this in docs unless it is already explained. > > > > This is a long-standing behaviour for which we get reports from time > > to time, and once analyzing a failure, Tom also looked at it and > > agreed that we don't have much choice to avoid skipping non-existent > > publications [5]. But we never concluded as to whether skipping should > > be a default behavior or an optional one. So, we need more opinions on > > it. > > I'm leaning toward making the skipping behavior a default as I could > not find a good benefit for the current behavior (i.e., stopping > logical replication due to missing publications). > Sounds reasonable. We can always add the option at a later point if required. Thanks for your input. We can continue reviewing and committing the current patch. --=20 With Regards, Amit Kapila.