Re: First draft of the PG 15 release notes

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: First draft of the PG 15 release notes
Date: 2022-05-14 04:52:10
Message-ID: CAA4eK1K+zWbSEZHgeoL4ok=hA7+-=EGiJzpw-DZODw0NUoP9zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 13, 2022 at 9:18 PM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> On Fri, May 13, 2022 at 08:24:53AM +0530, Amit Kapila wrote:
> > On Fri, May 13, 2022 at 6:02 AM Euler Taveira <euler(at)eulerto(dot)com> wrote:
> > >
> > > On Thu, May 12, 2022, at 11:22 AM, Bruce Momjian wrote:
> > >
> > > On Thu, May 12, 2022 at 11:12:54AM -0300, Euler Taveira wrote:
> > > OB> On Thu, May 12, 2022, at 11:03 AM, Bruce Momjian wrote:
> > > >
> > > > I looked at that but thought that everyone would already assume we
> > > > skipped replication of empty transactions, and I didn't see much impact
> > > > for the user, so I didn't include it.
> > > >
> > > > It certainly has an impact on heavy workloads that replicate tables with few
> > > > modifications. It receives a high traffic of 'begin' and 'commit' messages that
> > > > the previous Postgres versions have to handle (discard). I would classify it as
> > > > a performance improvement for logical replication. Don't have a strong opinion
> > > > if it should be mentioned or not.
> > >
> > > Oh, so your point is that a transaction that only has SELECT would
> > > previously send an empty transaction? I thought this was only for apps
> > > that create literal empty transactions, which seem rare.
> > >
> > > No. It should be a write transaction. If you have a replication setup that
> > > publish only table foo (that isn't modified often) and most of your
> > > workload does not contain table foo, Postgres sends 'begin' and 'commit'
> > > messages to subscriber even if there is no change to replicate.
> > >
> >
> > It reduces network traffic and improves performance by 3-14% on simple
> > tests [1] like the one shown by Euler. I see a value in adding this as
> > for the workloads where it hits, it seems more than 99% of network
> > traffic [2] is due to these empty messages.
>
> I see the point now --- new item:
>
> <!--
> Author: Amit Kapila <akapila(at)postgresql(dot)org>
> 2022-03-30 [d5a9d86d8] Skip empty transactions for logical replication.
> -->
>
> <listitem>
> <para>
> Prevent logical replication of empty transactions (Ajin Cherian,
> Hou Zhijie, Euler Taveira)
> </para>
>
> <para>
> Previously, write transactions would send empty transactions to
> subscribers if subscribed tables were not modified.
> </para>
> </listitem>
>

Thanks!

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2022-05-14 06:17:05 Re: JSON Functions and Operators Docs for v15
Previous Message Thomas Munro 2022-05-14 03:01:59 Re: Backends stunk in wait event IPC/MessageQueueInternal