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

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: How can end users know the cause of LR slot sync delays?
Date: 2025-11-26 07:13:26
Message-ID: CAJpy0uDKC0QubC0pL=bZ4Qnq3eQbykLnFu5x=wmDkOmL44QL7g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 26, 2025 at 11:58 AM Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> wrote:
>
>
> I have also addressed the remaining comments and attached the updated patch.
>

Thanks. Please find a few comment:

1)
+ <structfield>slotsync_skip_reason</structfield><type>text</type>
+ </para>
+ <para>
+ The reason for the last slot synchronization skip. Slot synchronization
+ occurs only on standby servers and for synced slots (that is,
those whose
+ <structfield>synced</structfield> field is <literal>true</literal>).
+ Thus, this column has no meaning on the primary server and
slot which are
+ not synced. <literal>NULL</literal> if slot synchronization is not
+ performed yet or is successful. Possible values are:

Second line is confusing (..for synced slots..). Shall we rephrase the
complete thing to:

The reason for the last slot synchronization skip. Slot
synchronization occurs only on standby servers and thus this column
has no meaning on the primary server. It is relevant mainly for
logical slots on standby servers whose synced field is true. NULL if
slot synchronization is successful.

2)
Also in the 'possible values section', at one place we are using a
'failover slot on primary' and at another place 'remote slot'. We can
make these words also consistent. Shall we use 'failover slot on
primary' everywhere (as failover is a more widely used term than
remote in existing doc)?

3)
GetSlotSyncSkipReasonName()

+ default:
+ break;
+ }
+
+ Assert(false);
+ return NULL;

Shall we have :

default:
elog(ERROR, "unexpected slotsync skip reason: %d", (int) reason);
return NULL;
}
}

See other such functions: handle_streamed_transaction(),
RelationCreateStorage().

thanks
Shveta

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2025-11-26 07:18:52 Re: [PATCH] Refactor bytea_sortsupport(), take two
Previous Message Nikhil Kumar Veldanda 2025-11-26 07:09:00 Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)