Re: Typo in tablesync comment

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Typo in tablesync comment
Date: 2021-02-02 13:53:37
Message-ID: CAA4eK1+qrSYDpNiJsH_rrD8e=3oLSyEBrfLe1H0oRqfeVCzQiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 2, 2021 at 10:49 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Tue, Feb 02, 2021 at 10:38:31AM +1100, Peter Smith wrote:
> > PSA a trivial patch to correct what seems like a typo in the tablesync comment.
>
> - * subscribed tables and their state. Some transient state during data
> - * synchronization is kept in shared memory. The states SYNCWAIT and
> + * subscribed tables and their state. Some transient states during data
> + * synchronization are kept in shared memory. The states SYNCWAIT and
>
> This stuff refers to SUBREL_STATE_* in pg_subscription_rel.h, and FWIW
> I find confusing the term "transient" in this context as a state may
> last for a rather long time, depending on the time it takes to
> synchronize the relation, no?
>

These in-memory states are used after the initial copy is done. So,
these are just for the time the tablesync worker is synced-up with
apply worker. In some cases, they could be for a longer period of time
when apply worker is quite ahead of tablesync worker then we will be
in the CATCHUP state for a long time but SYNCWAIT will still be for a
shorter period of time.

> I am wondering if we could do better
> here, say:
> "The state tracking the progress of the relation synchronization is
> additionally stored in shared memory, with SYNCWAIT and CATCHUP only
> appearing in memory."
>

I don't mind changing to your proposed text but I think the current
wording is also okay and seems clear to me.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-02-02 14:05:58 Re: [PATCH] remove deprecated v8.2 containment operators
Previous Message iwata.aya@fujitsu.com 2021-02-02 13:53:23 RE: libpq debug log