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

Поиск
Список
Период
Сортировка
От Hayato Kuroda (Fujitsu)
Тема RE: How can end users know the cause of LR slot sync delays?
Дата
Msg-id OSCPR01MB149667E5CFDD8F2A3DB7801D2F5E6A@OSCPR01MB14966.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на RE: How can end users know the cause of LR slot sync delays?  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Список pgsql-hackers
Dear Shlok,

> Thanks for updating the patch. Here are my comments.

I found one more comment.

```
+       /*
+        * If found_consistent_snapshot is not NULL and a consistent snapshot is
+        * found set the slot sync skip reason to none. Else, if consistent
+        * snapshot is not found the stats will be updated in the function
+        * update_and_persist_local_synced_slot
+        */
+       if (!found_consistent_snapshot || *found_consistent_snapshot)
+               update_slot_sync_skip_stats(slot, SS_SKIP_NONE);
```

I think the condition is confusing; in code level there is a path that
found_consistent_snapshot is NULL but synchronization happened. (Not sure it is
possible though).

I think it is better to put update_slot_sync_skip_stats() near the sync part.
If the snapshot exists from the beginning, it can be done unconditionally,
otherwise we can check again. Attached .diffs file implements it.

Best regards,
Hayato Kuroda
FUJITSU LIMITED


Вложения

В списке pgsql-hackers по дате отправления: