Re: Time delayed LR (WAS Re: logical replication restrictions)

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: osumi(dot)takamichi(at)fujitsu(dot)com, smithpb2250(at)gmail(dot)com, vignesh21(at)gmail(dot)com, kuroda(dot)hayato(at)fujitsu(dot)com, shveta(dot)malik(at)gmail(dot)com, dilipbalaut(at)gmail(dot)com, euler(at)eulerto(dot)com, m(dot)melihmutlu(at)gmail(dot)com, andres(at)anarazel(dot)de, marcos(at)f10(dot)com(dot)br, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Time delayed LR (WAS Re: logical replication restrictions)
Date: 2023-01-24 06:15:36
Message-ID: CAA4eK1+DJ9N3TUHZ7AFhDQECbpM4JYHWO=N1rDUJqyYGqx3EBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 24, 2023 at 8:35 AM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> wrote:
>
> Sorry, I forgot to write one comment.
>
> At Tue, 24 Jan 2023 11:45:35 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
>
> + /* Should we delay the current transaction? */
> + if (finish_ts)
> + maybe_delay_apply(xid, finish_ts);
> +
> if (!am_parallel_apply_worker())
> maybe_start_skipping_changes(lsn);
>
> It may not give actual advantages, but isn't it better that delay
> happens after skipping?
>

If we go with the order you are suggesting then the LOGs will appear
as follows when we are skipping the transaction:

"logical replication starts skipping transaction at LSN ..."
"time-delayed replication for txid %u, min_apply_delay = %lld ms,
Remaining wait time: ..."

Personally, I would prefer the above LOGs to be in reverse order as it
doesn't make much sense to me to first say that we are skipping
changes and then say the transaction is delayed. What do you think?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2023-01-24 06:17:13 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Amit Kapila 2023-01-24 05:58:58 Re: Time delayed LR (WAS Re: logical replication restrictions)