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

From: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(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>
Subject: RE: How can end users know the cause of LR slot sync delays?
Date: 2025-11-26 08:53:34
Message-ID: TY4PR01MB1690748D707245F357EED2E5894DEA@TY4PR01MB16907.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, November 26, 2025 2:29 PM 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 for updating the patch, I have few comments:

1.
+/*
+ * Map a SlotSyncSkipReason enum to a human-readable string
+ */
+static char *
+GetSlotSyncSkipReasonName(SlotSyncSkipReason reason)

Shall we add a static array to map the Enum value to the reason name
instead of adding the following function ?

2.
+ <literal>remote_behind</literal> means that the slot is ahead of the
+ corresponding failover slot on the primary.

I think the current naming and doc is not easy for user to understand. So, I
suggest mentioning the explicit reason of this skip, e.g., the required WALs and
rows are removed or at the risk of removal. We can rename this reason to
"wal_or_rows_removed" and make the document similar to the content in
logicaldecoding.sgml.

Best Regards,
Hou zj

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sugamoto Shinya 2025-11-26 08:55:09 Re: [PATCH] Add error hints for invalid COPY options
Previous Message shveta malik 2025-11-26 08:42:29 Re: Improve pg_sync_replication_slots() to wait for primary to advance