Re: Introduce XID age and inactive timeout based replication slot invalidation

Поиск
Список
Период
Сортировка
От vignesh C
Тема Re: Introduce XID age and inactive timeout based replication slot invalidation
Дата
Msg-id CALDaNm3wx8ihfkidveKuK=gGujS_yc9sEgq6ev-T+W3zeHM88g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Introduce XID age and inactive timeout based replication slot invalidation  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
On Thu, 6 Feb 2025 at 16:08, Nisha Moond <nisha.moond412@gmail.com> wrote:
> Here are the v71 patches with the above comments incorporated.

Few comments:
1) While changing the switch to an if condition, the behavior of the
break statement has changed. Previously, it would exit the switch, but
now it exits the main for loop without releasing the locks. These
should be replaced with a goto to ensure the locks are properly
released.
+                       if (cause & RS_INVAL_HORIZON)
+                       {
+                               if (!SlotIsLogical(s))
                                        break;
-                               case RS_INVAL_WAL_LEVEL:
-                                       if (SlotIsLogical(s))
-                                               invalidation_cause = cause;
+                               /* invalid DB oid signals a shared relation */
+                               if (dboid != InvalidOid && dboid !=
s->data.database)
                                        break;

2) None of this initialization is required, as we will be setting
these values before using it:
+       int                     minutes = 0;
+       int                     secs = 0;
+       long            elapsed_secs = 0;

Regards,
Vignesh



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