From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | amborodin(at)acm(dot)org, amul sul <sulamul(at)gmail(dot)com> |
Subject: | Re: background sessions |
Date: | 2016-12-29 22:18:08 |
Message-ID: | f8032025-97b4-d6ee-31cc-61154dba4cb6@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/16/16 10:38 AM, Andrew Borodin wrote:
> 2016-12-16 20:17 GMT+05:00 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)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
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Add-background-sessions.patch | text/x-patch | 75.4 KB |
0001-dblink-Replace-some-macros-by-static-functions.patch | text/x-patch | 15.1 KB |
0002-dblink-Add-background-sessions-support.patch | text/x-patch | 32.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2016-12-30 01:01:07 | Re: Faster methods for getting SPI results |
Previous Message | Andreas Seltenreich | 2016-12-29 22:15:54 | Re: [sqlsmith] Short reads in hash indexes |