Re: [PATCH] Logical decoding of TRUNCATE

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [PATCH] Logical decoding of TRUNCATE
Дата
Msg-id f6352c33-f3e3-0e35-dbd2-29949b9c2b59@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [PATCH] Logical decoding of TRUNCATE  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Ответы Re: [PATCH] Logical decoding of TRUNCATE
Список pgsql-hackers
On 22/01/18 19:45, Petr Jelinek wrote:
> On 19/01/18 12:37, Marco Nenciarini wrote:
>> Hi All,
>>>>> +     /* logicalrep_rel_close call not needed, because ExecuteTruncateGuts
>>>>> +      * already closes the relations. Setting localrel to NULL in the map entry
>>>>> +      * is still needed.
>>>>> +      */
>>>>> +     rel->localrel = NULL;
>>>>
>>>> This is somewhat ugly. Perhaps the ExecuteTruncateGuts should track
>>>> which relations it opened and only close those and the rest should be
>>>> closed by caller? That should also remove the other ugly part which is
>>>> that the ExecuteTruncateGuts modifies the input list. What if caller
>>>> wanted to use those relations it sent as parameter later?
>>>
>>> Agreed
>>>
>>
>> Attached a new version of the patch addressing these issues.
>>
> 
> Besides the small thing I wrote for the 0001 in the other thread I am
> pretty much happy with this now.
> 

Actually on second look, I don't like the new boolean parameter much.
I'd rather we didn't touch the input list and always close only
relations opened inside the ExecuteTruncateGuts().

It may mean more list(s) but the current interface is still not clean.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] PoC plpgsql - possibility to force custom or genericplan
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: [HACKERS] [PATCH] Generic type subscripting