pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedlogical replication
3+ messages / 2 participants
[nested] [flat]
* logical replication
@ 2021-05-21 12:41 Marc Millas <marc.millas@mokadb.com>
0 siblings, 1 reply; 3+ messages in thread
From: Marc Millas @ 2021-05-21 12:41 UTC (permalink / raw)
To: pgsql-performance
Hi,
my POC in postgres 12.(important ?)
if I setup 2 postgres clusters, and create a publication in one and a
subscription in the other,
and do on the pub an update which does not change the data (updating an
existing record with same data) then this (useless) update go through
replication.(ie consumes network ressource)
what are ways to avoid this ?
(I thought of a trigger to not execute the useless update, but I dont see
how to do this)
any ideas ?
thanks
PS: remarks about the meaning of this are off topic, thanks
Marc MILLAS
Senior Architect
+33607850334
www.mokadb.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: logical replication
@ 2021-05-21 13:21 Andrew Dunstan <andrew@dunslane.net>
parent: Marc Millas <marc.millas@mokadb.com>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Dunstan @ 2021-05-21 13:21 UTC (permalink / raw)
To: Marc Millas <marc.millas@mokadb.com>; pgsql-performance
On 5/21/21 8:41 AM, Marc Millas wrote:
> Hi,
>
> my POC in postgres 12.(important ?)
>
> if I setup 2 postgres clusters, and create a publication in one and a
> subscription in the other,
> and do on the pub an update which does not change the data (updating
> an existing record with same data) then this (useless) update go
> through replication.(ie consumes network ressource)
>
> what are ways to avoid this ?
> (I thought of a trigger to not execute the useless update, but I
> dont see how to do this)
> any ideas ?
>
> thanks
> PS: remarks about the meaning of this are off topic, thanks
>
>
Postgres provides exactly such a trigger. See
https://www.postgresql.org/docs/12/functions-trigger.html
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: logical replication
@ 2021-05-21 13:44 Marc Millas <marc.millas@mokadb.com>
parent: Andrew Dunstan <andrew@dunslane.net>
0 siblings, 0 replies; 3+ messages in thread
From: Marc Millas @ 2021-05-21 13:44 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-performance
perfect :-)
thanks
Marc MILLAS
Senior Architect
+33607850334
www.mokadb.com
On Fri, May 21, 2021 at 3:21 PM Andrew Dunstan <andrew@dunslane.net> wrote:
>
> On 5/21/21 8:41 AM, Marc Millas wrote:
> > Hi,
> >
> > my POC in postgres 12.(important ?)
> >
> > if I setup 2 postgres clusters, and create a publication in one and a
> > subscription in the other,
> > and do on the pub an update which does not change the data (updating
> > an existing record with same data) then this (useless) update go
> > through replication.(ie consumes network ressource)
> >
> > what are ways to avoid this ?
> > (I thought of a trigger to not execute the useless update, but I
> > dont see how to do this)
> > any ideas ?
> >
> > thanks
> > PS: remarks about the meaning of this are off topic, thanks
> >
> >
>
> Postgres provides exactly such a trigger. See
> https://www.postgresql.org/docs/12/functions-trigger.html
>
>
> cheers
>
>
> andrew
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-05-21 13:44 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 12:41 logical replication Marc Millas <marc.millas@mokadb.com>
2021-05-21 13:21 ` Andrew Dunstan <andrew@dunslane.net>
2021-05-21 13:44 ` Marc Millas <marc.millas@mokadb.com>
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