Re: background sessions

From: Andrew Borodin <borodin(at)octonica(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, amul sul <sulamul(at)gmail(dot)com>
Subject: Re: background sessions
Date: 2017-01-12 05:45:49
Message-ID: CAJEAwVF_2_4go=xqPPUmJNptNENXgfotfA30ECgPZwjhQNnPmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2017-01-12 9:01 GMT+05:00 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>:
> On 1/10/17 10:58 AM, Robert Haas wrote:
>> On Thu, Dec 29, 2016 at 5:18 PM, Peter Eisentraut
>> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>>> 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.
>>
>> Would that constitute a complete replacement for pg_background?
>
> I think so.
That constitute replacement on the set of existing functionality.
It's not certain whether new features for pg_background would be
coherent with db_link ideology.
E.g. if one day we implement data exchange between two running queries
for pg_background, it would be in conflict with db_link ideology.

I have not opinion on is db_link or pg_background apropriate place for
this functionality. Just mentioning some thoughts.

BTW can we have an automatic FWD for bgsessions? Sounds crazy for me,
but technically make sense.

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-01-12 05:49:22 Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal
Previous Message Kuntal Ghosh 2017-01-12 05:25:16 Re: many copies of atooid() and oid_cmp()