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

From Peter Eisentraut
Subject Re: [HACKERS] background sessions
Date
Msg-id f8032025-97b4-d6ee-31cc-61154dba4cb6@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] background sessions  (Andrew Borodin <borodin@octonica.com>)
Responses Re: [HACKERS] background sessions  (amul sul <sulamul@gmail.com>)
Re: [HACKERS] autonomous transactions  (Andrey Borodin <amborodin@acm.org>)
Re: [HACKERS] background sessions  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] background sessions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
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.

For additional entertainment, I include patches that integrate
background sessions into dblink.  So dblink can open a connection to a
background session, and then you can use the existing dblink functions
to send queries, read results, etc.  People use dblink to make
self-connections to get autonomous subsessions, so this would directly
address that use case.  The 0001 patch is some prerequisite refactoring
to remove an ugly macro mess, which is useful independent of this.  0002
is the actual patch.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

-- 
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: Andreas Seltenreich
Date:
Subject: Re: [HACKERS] [sqlsmith] Short reads in hash indexes
Next
From: Jim Nasby
Date:
Subject: Re: [HACKERS] Faster methods for getting SPI results