Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify

Поиск
Список
Период
Сортировка
От Bernd Helmle
Тема Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify
Дата
Msg-id 2EC3C2B1067A1C975C7BEF9F@apophis.credativ.lan
обсуждение исходный текст
Ответ на Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

--On 13. Juni 2013 18:12:05 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote:

>> What i tried before was to access (in PlanForeignModify) the RelOptInfo
>> structure through PlannerInfo->simple_rel_array, assuming the the
>> resultRelation index points to the right array member. However, that
>> didn't  work, the fdw_private List is not the one filled by
>> GetForeignPlan...is  there another way to get back the RelOptInfo worked
>> on earlier?
>
> It should work ... *if* there was in fact a RelOptInfo worked on
> earlier.  There sometimes isn't.  You might need to do something like
> what make_modifytable() has to do to call you in the first place:

Sorry for the late feedback, didn't manage to get back to this earlier.

This works indeed, the RelOptInfo structure stored in simple_rel_array (if 
present) allows
a FDW to access its earlier scan state, assigned in GetForeignPlan() for 
example.

Thanks for the hints!

-- 
Bernd




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

Предыдущее
От: Jon Nelson
Дата:
Сообщение: Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Следующее
От: jasmine
Дата:
Сообщение: Re: Randomisation for ensuring nlogn complexity in quicksort