Re: Minimal logical decoding on standbys

Поиск
Список
Период
Сортировка
От Drouvot, Bertrand
Тема Re: Minimal logical decoding on standbys
Дата
Msg-id 513952f7-e8d5-4bdf-f8b3-002b1264badf@gmail.com
обсуждение исходный текст
Ответ на Re: Minimal logical decoding on standbys  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Minimal logical decoding on standbys  (Amit Kapila <amit.kapila16@gmail.com>)
Re: Minimal logical decoding on standbys  (Jeff Davis <pgsql@j-davis.com>)
Re: Minimal logical decoding on standbys  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

On 4/4/23 7:57 AM, Amit Kapila wrote:
> On Mon, Apr 3, 2023 at 8:51 PM Drouvot, Bertrand
> <bertranddrouvot.pg@gmail.com> wrote:
>>
>> I made it as simple as:
>>
>>           /*
>>            * If the slot is already invalid or is a non conflicting slot, we don't
>>            * need to do anything.
>>            */
>>           islogical = xid ? true : false;
>>
>>           if (SlotIsInvalid(s, islogical) || SlotIsNotConflicting(s, islogical, xid, &oldestLSN))
>>
>> in V56 attached.
>>
> 
> Here the variable 'islogical' doesn't seem to convey its actual
> meaning because one can imagine that it indicates whether the slot is
> logical which I don't think is the actual intent.

Good point. Just renamed it to 'check_on_xid' (as still needed outside of
the "CanInvalidateSlot" context) in V58 attached.

> One idea to simplify
> this is to introduce a single function CanInvalidateSlot() or
> something like that and move the logic from both the functions
> SlotIsInvalid() and SlotIsNotConflicting() into the new function.
> 

Oh right, even better, thanks!
Done in V58 and now this is as simple as:

+               if (DoNotInvalidateSlot(s, xid, &oldestLSN))
                 {
                         /* then, we are not forcing for invalidation */


Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Вложения

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Should vacuum process config file reload more often
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Minimal logical decoding on standbys