Foreign memory context read

Поиск
Список
Период
Сортировка
От Vaibhav Kaushal
Тема Foreign memory context read
Дата
Msg-id BANLkTi=VN93FCH1rp_jyqFL1AfZZFtiFAQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Foreign memory context read
Список pgsql-hackers
Hello,

I made some code changes, compilation went fine but the database could not start with the message:

LOG:  server process (PID 17684) was terminated by signal 11: Segmentation fault

I think this is because of memory allocation outside of any memory context. 

Is it possible to create some variable in a memory context (say "cut_context") and then access the variable in that context from a piece of code which is working with variables in a different context (say the "per_query" context)?

If yes, then how? 

My first guess is a Memory Context switch. But then, I need to bring in the value of the variable from the cut_context (which was formed earlier) to the per_query context which was created later on. 

Precisely I am trying to create a small array of Datums (before the ExecQual is called inside ExecScan) and then use the array inside the ExecEvalVar (which obviously is inside the executer).

Any help pointers towards the solution of this problem?

Regards,
Vaibhav


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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Alignment padding bytes in arrays vs the planner
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Foreign memory context read