Re: [HACKERS] background sessions - Mailing list pgsql-hackers

From amul sul
Subject Re: [HACKERS] background sessions
Date
Msg-id CAAJ_b97ZxgngFX_W27a=jwm5sDQ4rMUzzTgf4XT5mmos+CfDxw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] background sessions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] background sessions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Fri, Dec 30, 2016 at 3:48 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 12/16/16 10:38 AM, Andrew Borodin wrote:
>> 2016-12-16 20:17 GMT+05:00 Peter Eisentraut <peter.eisentraut@2ndquadrant.com>:
>>>> And one more thing... Can we have BackgroundSessionExecute() splitted
>>>> into two parts: start query and wait for results?
>>>> It would allow pg_background to reuse bgsession's code.
>>>
>>> Yes, I will look into that.
>>
>> Thank you. I'm marking both patches as "Waiting for author", keeping
>> in mind that pg_background is waiting for bgsessions.
>> After updates I'll review these patches.
>
> New patch, mainly with the function split as you requested above, not
> much else changed.
>

Thanks for your v2 patch, this is really helpful.

One more requirement for pg_background is session, command_qh,
response_qh and worker_handle should be last longer than current
memory context, for that we might need to allocate these in
TopMemoryContext.  Please find attach patch does the same change in
BackgroundSessionStart().

Do let me know if you have any other thoughts/suggestions, thank you.

Regards,
Amul

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: "Regina Obe"
Date:
Subject: Re: [HACKERS] What is "index returned tuples in wrong order" for recheck supposed to guard against?
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Potential data loss of 2PC files