public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tomas Vondra <[email protected]>
To: Ajin Cherian <[email protected]>
To: Euler Taveira <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Rahila Syed <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Önder Kalacı <[email protected]>
Cc: japin <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: David Steele <[email protected]>
Cc: Craig Ringer <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: Amit Langote <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: row filtering for logical replication
Date: Mon, 27 Sep 2021 15:34:08 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CA+HiwqH+9NK5m-=BOYpzjH5UEpeWjT_3HEm4XBYNrda88naGMQ@mail.gmail.com>
<CAA4eK1+qd1OATDSZCrjebZx+3qm1=RmF-fDU_1YsT__XYnxvVA@mail.gmail.com>
<CAHut+Pvn+S8upyrkBi3m=rc4b5Ttw3xGsg09rNec=qJK0pD5mQ@mail.gmail.com>
<CAA4eK1J1FNhDhj85Am1X_5VTxKOYo_nSBMuuMteB3n5YVPMdpw@mail.gmail.com>
<CAHut+PtbKUmWNjTEDMVhP9abjgph6JB7vUFYF7ioa_4uRPZb=A@mail.gmail.com>
<CAA4eK1LPhubcm4o1Xg0RwZdatqwfz3KKYcdun8QvRyqFthyJ1g@mail.gmail.com>
<CAHut+PtFxoP477E8odkxkpyDoH_tiNBSiJH-j88NR728nxPErQ@mail.gmail.com>
<CAA4eK1+tio46goUKBUfAKFsFVxtgk8nOty=TxKoKH-gdLzHD2g@mail.gmail.com>
<CAHut+PtdRU74kUZd2RugdCqB0Ya1L+BbZk45czM5ufQs5E8jmw@mail.gmail.com>
<CAHut+PsgRHymwLhJ9t3By6+KNaVDzfjf6Y4Aq=JRD-y8t1mEFg@mail.gmail.com>
<[email protected]>
<CAFPTHDb7bpkuc4SxaL9B5vEvF2aEi0EOERdrG+xgVeAyMJsF=Q@mail.gmail.com>
<CAFPTHDYZk4P1kD=y6qMBnzh66+CgnfV3VTK7yS-Tk1eGrFOVZg@mail.gmail.com>
<[email protected]>
Hi,
I see no one responded to this important part of my review so far:
On 9/23/21 2:33 PM, Tomas Vondra wrote:
> 3) create_subscription.sgml
>
> <literal>WHERE</literal> clauses, rows must satisfy all expressions
> to be copied. If the subscriber is a
>
> I'm rather skeptical about the principle that all expressions have to
> match - I'd have expected exactly the opposite behavior, actually.
>
> I see a subscription as "a union of all publications". Imagine for
> example you have a data set for all customers, and you create a
> publication for different parts of the world, like
>
> CREATE PUBLICATION customers_france
> FOR TABLE customers WHERE (country = 'France');
>
> CREATE PUBLICATION customers_germany
> FOR TABLE customers WHERE (country = 'Germany');
>
> CREATE PUBLICATION customers_usa
> FOR TABLE customers WHERE (country = 'USA');
>
> and now you want to subscribe to multiple publications, because you want
> to replicate data for multiple countries (e.g. you want EU countries).
> But if you do
>
> CREATE SUBSCRIPTION customers_eu
> PUBLICATION customers_france, customers_germany;
>
> then you won't get anything, because each customer belongs to just a
> single country. Yes, I could create multiple individual subscriptions,
> one for each country, but that's inefficient and may have a different
> set of issues (e.g. keeping them in sync when a customer moves between
> countries).
>
> I might have missed something, but I haven't found any explanation why
> the requirement to satisfy all expressions is the right choice.
>
> IMHO this should be 'satisfies at least one expression' i.e. we should
> connect the expressions by OR, not AND.
Am I the only one finding the current behavior strange? What's the
reasoning supporting the current approach?
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
view thread (489+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: row filtering for logical replication
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox