Re: How can end users know the cause of LR slot sync delays?

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Michael Banck <mbanck@gmx.net>
Cc: shveta malik <shveta.malik@gmail.com>, Shlok Kyal <shlok.kyal.oss@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Ashutosh Sharma <ashu.coek88@gmail.com>
Date: 2025-11-28T10:00:48Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Rename column slotsync_skip_at to slotsync_last_skip.

  2. Add slotsync_skip_reason column to pg_replication_slots view.

  3. Fix test failure caused by commit 76b78721ca.

  4. Fix a BF failure caused by commit 76b78721ca.

  5. Add slotsync skip statistics.

On Fri, Nov 28, 2025 at 2:45 PM Michael Banck <mbanck@gmx.net> wrote:
>
> Hi,
>
> On Fri, Nov 21, 2025 at 11:00:36AM +0530, shveta malik wrote:
> > 2)
> > +            s.slotsync_skip_count,
> > +            s.last_slotsync_skip_at,
> >
> > Shall we rename last_slotsync_skip_at to slotsync_last_skip_at. That
> > way all slotsync related stats columns will have same prefix.
>
> I am not sure that was a great change. AFAICT, we only have _at once in
> the catalog, and that if for two_phase_at. There, AIUI, it marks the
> specific timestamp two_phase was enabled(?) for logical replication, not
> the last time something happened.
>
> So I think using _at here as well is confusing as this one is about the
> last time a slotsync was skipped. I think it should be renamed to
> 'last', as per our usual naming.
>
> I agree that having the same prefix would be nice, but it looks like
> almost all other columns are named last_something (except for
> checksum_last_failure, but that's been around for a long time).
>

I suggested the current one because having the last was making the
column name bit longer, and anyway the description clarifies it, but I
see your point. So, the other options could be
slotsync_last_skip_time, sync_last_skip_time, last_slotsync_skip_time,
last_sync_skip_time . The first two makes it easier to query similar
columns (slotsync related) together and the later two makes it similar
to existing ones in other views. The current one keeps the name
shorter and makes it easily queryable with other slotsync columns.

-- 
With Regards,
Amit Kapila.