pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexey Zagarin <zagarin@gmail.com>
To: Euler Taveira <euler@timbira.com.br>
To: Erik Rijkers <er@xs4all.nl>
Cc: Andres Freund <andres@anarazel.de>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Suzuki Hironobu <hironobu@interdb.jp>
Cc: a.kondratov@postgrespro.ru
Subject: Re: row filtering for logical replication
Date: Wed, 4 Sep 2019 08:21:27 +0700
Message-ID: <c6a2bd52-c5cb-4ca3-aace-ebfe5a330b91@Spark> (raw)
In-Reply-To: <9f25bd90d9f959f364efe79d92468682@xs4all.nl>
References: <CAHE3wggb715X+mK_DitLXF25B=jE6xyNCH4YOwM860JR7HarGQ@mail.gmail.com>
	<CAHE3wgiHOdFHcEpm_w5f8vAXiugDmTciTiegNGVktezMbFkkrg@mail.gmail.com>
	<7106a0fc-8017-c0fe-a407-9466c9407ff8@2ndquadrant.com>
	<CAHE3wggWAtbT+Yt_MDy0uQwZcc6x820OwHp3_TBtAqtBeW4+Ug@mail.gmail.com>
	<20190203101439.26xgw5sv7vhgdcz2@alap3.anarazel.de>
	<CAHE3wgga+Z4PkzN4FgR5pO_y4Mn30mRcjfno5aXbnQE9YniEkw@mail.gmail.com>
	<d815a4a0f59e9c1b51caceae485b1193@xs4all.nl>
	<CAHE3wghn9hu10-YSr7p4TyRUurVAif3O+NhX7MsD=XEvPROSxQ@mail.gmail.com>
	<94b31725538135038f2fccaf08bf3811@xs4all.nl>
	<5720d79c-3d09-4ac2-b233-355220471838@Spark>
	<CAHE3wgjEQ9O5N8SvWJsVJU-zGTwd0VFqnijTabWpB9Un9-s0_w@mail.gmail.com>
	<9f25bd90d9f959f364efe79d92468682@xs4all.nl>

> OK, I'll consider Alexey Kondratov's set of patches as the current
> state-of-the-art then. (They still apply.)

Alexey's patch is the rebased version of previous Euler's patch set, with slot type mistake fixed, and adapted to current changes in the master branch. It also has testing improvements. On the other hand, the new patches from Euler include more fixes and the implementation of filtering in COPY (as far as I can tell from code) which addresses my particular pain point with BDR. Hope they'll be joined soon. :)

> It turns out this did not work until I added a wait state after the
> CREATE SUBSCRIPTION. It always fails without the wait state, and always
> works with the wait state.
>
> Do you agree this is a bug?

I'm not sure this is a bug as after the subscription is added (or a new table added to the publication and then the subscription is refreshed), the whole table is synchronized using COPY statement. Depending on size of the table it can take some time. You may want to check srsubstate in pg_subscription_rel instead of just sleep for more reliable implementation.

Alexey

view thread (701+ messages)  latest in thread

Message-ID: <c6a2bd52-c5cb-4ca3-aace-ebfe5a330b91@Spark>
Permalink:  ../c6a2bd52-c5cb-4ca3-aace-ebfe5a330b91@Spark/
Also on:    postgresql.org/message-id/c6a2bd52-c5cb-4ca3-aace-ebfe5a330b91@Spark

 · 

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: pgsql-hackers@postgresql.org
  Cc: zagarin@gmail.com, euler@timbira.com.br, er@xs4all.nl, andres@anarazel.de, petr.jelinek@2ndquadrant.com, hironobu@interdb.jp, a.kondratov@postgrespro.ru
  Subject: Re: row filtering for logical replication
  In-Reply-To: <c6a2bd52-c5cb-4ca3-aace-ebfe5a330b91@Spark>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox