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 1sYnSS-00E8Gl-H2 for pgsql-general@arkaria.postgresql.org; Tue, 30 Jul 2024 14:04:08 +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 1sYnSQ-00AQJZ-M9 for pgsql-general@arkaria.postgresql.org; Tue, 30 Jul 2024 14:04:06 +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 1sYnSQ-00AQJQ-Ae for pgsql-general@lists.postgresql.org; Tue, 30 Jul 2024 14:04:06 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sYnSN-002G3g-JP for pgsql-general@lists.postgresql.org; Tue, 30 Jul 2024 14:04:05 +0000 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3db1d4dab7fso2804127b6e.1 for ; Tue, 30 Jul 2024 07:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722348242; x=1722953042; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8sEZYy2vretaHPdH4bQbKFgT2ettEBRFlxUHE2cOm6Y=; b=S0kCcbhQNKk/n/f1r88KvPP4bsrp0RvNr6TklO9Ddg6NC6TMoDCn3ERXB3QJWz3efw BOXY6lN2zQL1iPjVYqZriKVrNzY7eZVct3rzGt9UqiGPXIuoqah7CLwcEEer5z1/vc+d YsyTE1jpaHkFXcZHUSMJ5g8WL4c7V21090+LgnN45f+XSJ/dSurYgNTVDYo9uEzGsNUL 5sA6s8TvmCSdLzg9QGy94JhNboW/QjXS0p62AgGNyuEfCSXra9Zx9u5pNFTNW6mEC1Mk dMVmmvnTJn99oOv36qaa/OCDWp5QHMKIsV/cRqv3plH7F22zEzLpif2yxN8PNLWk4Hr+ +Q2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722348242; x=1722953042; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8sEZYy2vretaHPdH4bQbKFgT2ettEBRFlxUHE2cOm6Y=; b=cOxjwELdWJhgB5HVQ548Tplm2Wk3v5At2sQsYkrHryOoeEm1Dx1khueQrsNCJL1xSH 3xkATi7F93diOY0zO4vdvRUez6JAz77hpvYMwgGWUP5wjLJgFW08HKPbG7H4boQqhyja psile1LbVv7UE8ICRfnVP2wjtRtJnfOUqqZvZqXUUoZfEMo9QaIqXBsC7yDFevktd4jQ x/7fScj4M/JdRoRxS09UlF4iFy6PNvk4StiC35agAkuvz5rzKOL3amLKvNmPJrvTv4bl fnoLO1uh7GqLQ1KX6aFo9w/fuci3TySKo0sxLEaTAEDvHlChW2MVx8Ps5sU4qD4G3x0a 1xHw== X-Gm-Message-State: AOJu0YwSCTrPiAEwUvaDjRkkwykKUhIHJXKUgLEOqgy8X1UHFp41ur92 861Lj+xJTDOtTm3UV6b0JTp6g/VcSBNs6rHCBmh6Y6J3CB/+BLzBJSUpJlhJVjUnBFGT2h5KFvO xfw0o9XFsnaSe/Tekwe2LAZR2E/lo6fYu X-Google-Smtp-Source: AGHT+IEBExs8DCc3MhP3flR+shsfJaHCHQPto/+R2kHRrC0JwKRbgORpDcj8BBpX5OBgje0JOFe5/6zQ6yHUDnBCofs= X-Received: by 2002:a05:6808:2010:b0:3d9:2bab:de1f with SMTP id 5614622812f47-3db239d3588mr15064504b6e.25.1722348241717; Tue, 30 Jul 2024 07:04:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:6c86:0:b0:557:c384:fb61 with HTTP; Tue, 30 Jul 2024 07:04:01 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Tue, 30 Jul 2024 07:04:01 -0700 Message-ID: Subject: Re: Understanding conflicts on publications and subscriptions To: Koen De Groote Cc: PostgreSQL General Content-Type: multipart/alternative; boundary="00000000000020916c061e777335" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000020916c061e777335 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, July 30, 2024, Koen De Groote wrote: > > If the subscriber gets a bit of logic to say "Something went wrong, so I'= m > automatically stopping what I'm doing", it sounds logical to give the > publisher the same ability. > The wording for that option is: Specifies whether the subscription should be automatically disabled if any errors are detected by subscription workers during data replication from the publisher. A subscription worker has no clue what the publisher is doing. It operates on the =E2=80=9Cwhen I see data I act on it=E2=80=9D model. As for whether the publisher should have this clause - the errors in question are logical, data-oriented, errors, which the publisher is incapable of having. I believe what you are effectively requesting is that instead of disallowing updates and deletes on the added table that lacks replica identity you wish for the addition itself to fail. That would have made a better default behavior with an option to override when the current behavior is desired. But it seems too late to change this decision now. David J. --00000000000020916c061e777335 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, July 30, 2024, Koen De Groote <kdg.dev@gmail.com> wrote:
If the subscriber gets a bit of logic to say "Someth= ing went wrong, so I'm automatically stopping what I'm doing",= it sounds logical to give the publisher the same ability.

The wording for that option is:
=C2= =A0Specifies whether the subscription should be automatically disabled i= f any errors are detected by subscription workers during data replication f= rom the publisher.=C2=A0

A subscription worker has no clue what the publisher is doing.=C2=A0 I= t operates on the =E2=80=9Cwhen I see data I act on it=E2=80=9D model.

As for whether the publisher shoul= d have this clause - the errors in question are logical, data-oriented, err= ors, which the publisher is incapable of having.

I believe what you are effectively requesting is that in= stead of disallowing updates and deletes on the added table that lacks repl= ica identity you wish for the addition itself to fail.=C2=A0 That would hav= e made a better default behavior with an option to override when the curren= t behavior is desired.=C2=A0 But it seems too late to change this decision = now.

David J.
--00000000000020916c061e777335--