Re: [GENERAL] currval and DISCARD ALL

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема Re: [GENERAL] currval and DISCARD ALL
Дата
Msg-id CAFcNs+pEOb4oteyVX_mxxtcQfKOPnK2swaOGT=Lo-4yY3kCEog@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] currval and DISCARD ALL  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [GENERAL] currval and DISCARD ALL  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: [GENERAL] currval and DISCARD ALL  (Boszormenyi Zoltan <zb@cybertec.at>)
Re: [GENERAL] currval and DISCARD ALL  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers

On Fri, Apr 19, 2013 at 11:12 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Fri, Apr 19, 2013 at 10:05 AM, Fabrízio de Royes Mello
<fabriziomello@gmail.com> wrote:
> The attached wip patch do that and introduce a subcommand 'SEQUENCES', but
> if we decide to don't add a new subcommand to DISCARD, then its easier to
> modify the patch.

This patch is quite wrong.  It frees seqtab without clearing the
pointer, so the next reference will stomp on memory that may have been
reallocated.  And it doesn't even free seqtab correctly, since it only
frees the first node in the linked list.


Ohh sorry... you're all right... I completely forgot to finish the ReleaseSequenceCaches to transverse 'seqtab' linked list and free each node. 

The attached patch have this correct code.

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: elog() error, trying CURENT OF with foreign table
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [GENERAL] currval and DISCARD ALL