Re: Free indexed_tlist memory explicitly within set_plan_refs()

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Free indexed_tlist memory explicitly within set_plan_refs()
Дата
Msg-id CAM3SWZSWvjNC6v=aaQv2C=8zCKpD3y-u2y59vPW5ANXSzftDtQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Free indexed_tlist memory explicitly within set_plan_refs()  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: Free indexed_tlist memory explicitly within set_plan_refs()  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On Thu, May 28, 2015 at 2:37 PM, Peter Geoghegan <pg@heroku.com> wrote:
> Attached, revised version incorporates this small fix, while adding an
> additional big fix, and a number of small style tweaks.
>
> This is mainly concerned with fixing the bug I was trying to fix when
> I spotted the minor pfree() issue:
>
> postgres=# insert into upsert (key, val) values('Foo', 'Bar') on
> conflict (key) do update set val = excluded.val where excluded.* is
> not null;
> ERROR:  XX000: variable not found in subplan target lists
> LOCATION:  fix_join_expr_mutator, setrefs.c:2003

My fix for this issue
(0001-Fix-bug-with-whole-row-Vars-in-excluded-targetlist.patch) still
missed something. There needs to be additional handling in
ruleutils.c:

postgres=# explain insert into upsert as u values (1, 'fooz') on conflict (key) do update set val = excluded.val where
excluded.*is not null;
 
ERROR:  XX000: bogus varattno for INNER_VAR var: 0
LOCATION:  get_variable, ruleutils.c:5904

I'll look for a fix for this additional issue tomorrow.
-- 
Peter Geoghegan



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: FPW compression leaks information
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: cannot set view triggers to replica