Re: A new message seems missing a punctuation

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: A new message seems missing a punctuation
Date: 2024-02-20 11:12:04
Message-ID: CAA4eK1L+fRzUEsN0jK6nFUzRfP7Euorvp0vkPbKntH8jmMkPmg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 20, 2024 at 4:21 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Mon, Feb 19, 2024 at 12:14 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> > > But I also don't quite understand what problem this is trying to
> > > report. Is this slot-syncing code running on the primary or the
> > > standby? If it's running on the primary, then surely it's expected
> > > that the remote slot will precede the local one. And if it's running
> > > on the standby, then the comments in
> > > update_and_persist_local_synced_slot about waiting for the remote side
> > > to catch up seem quite confusing, because surely we're chasing the
> > > primary and not the other way around?
> >
> > The local's restart_lsn could be ahead of than primary's for the very
> > first sync when the WAL corresponding to the remote's restart_lsn is
> > not available on standby (say due to a different wal related settings
> > the required WAL has been removed when we first time tried to sync the
> > slot). For more details, you can refer to comments atop slotsync.c
> > starting from "If the WAL corresponding to the remote's restart_lsn
> > ..."
>
> So why do we log a message about this?
>

This was added after the main commit of this functionality to find
some BF failures (where we were expecting the slot to sync but due to
one of these conditions not being met the slot was not synced) and we
can probably change it to DEBUG1 as well. I think we would need this
information w.r.t this functionality to gather more information in
case expected slots are not being synced and it may be helpful for
users to also know why the slots are not synced, if that happens.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-02-20 11:13:13 Re: Streaming read-ready sequential scan code
Previous Message Bharath Rupireddy 2024-02-20 11:10:44 Add lookup table for replication slot invalidation causes