Re: Force streaming every change in logical decoding

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: sawada(dot)mshk(at)gmail(dot)com, shiy(dot)fnst(at)fujitsu(dot)com, smithpb2250(at)gmail(dot)com, kuroda(dot)hayato(at)fujitsu(dot)com, dilipbalaut(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Force streaming every change in logical decoding
Date: 2022-12-22 09:23:34
Message-ID: CAA4eK1LdqfKHcSDx_C1dZf9To0PJX1DT2zU91MPLjHebN+8GOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 22, 2022 at 1:15 PM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> wrote:
>
> At Thu, 22 Dec 2022 12:35:46 +0530, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote in
> > I have addressed these comments in the attached. Additionally, I have
> > modified the docs and commit messages to make those clear. I think
> > instead of adding new tests with this patch, it may be better to
> > change some of the existing tests related to streaming to use this
> > parameter as that will clearly show one of the purposes of this patch.
>
> Being late but I'm warried that we might sometime regret that the lack
> of the explicit default. Don't we really need it?
>

For this, I like your proposal for "buffered" as an explicit default value.

> + Allows streaming or serializing changes immediately in logical decoding.
> + The allowed values of <varname>logical_decoding_mode</varname> are the
> + empty string and <literal>immediate</literal>. When set to
> + <literal>immediate</literal>, stream each change if
> + <literal>streaming</literal> option is enabled, otherwise, serialize
> + each change. When set to an empty string, which is the default,
> + decoding will stream or serialize changes when
> + <varname>logical_decoding_work_mem</varname> is reached.
>
> With (really) fresh eyes, I took a bit long time to understand what
> the "streaming" option is. Couldn't we augment the description by a
> bit?
>

Okay, how about modifying it to: "When set to
<literal>immediate</literal>, stream each change if
<literal>streaming</literal> option (see optional parameters set by
CREATE SUBSCRIPTION) is enabled, otherwise, serialize each change.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-12-22 10:04:10 Re: Perform streaming logical transactions by background workers and parallel apply
Previous Message David Rowley 2022-12-22 09:21:51 Re: Avoid lost result of recursion (src/backend/optimizer/util/inherit.c)