From: | Markus Wanner <markus(at)bluegap(dot)ch> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Colin 't Hart <colinthart(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: TODO note |
Date: | 2010-09-16 09:02:49 |
Message-ID: | 4C91DD39.8070709@bluegap.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 09/15/2010 07:30 PM, Robert Haas wrote:
> One problem with autonomous transactions is that you have to figure
> out where to store all the state associated with the autonomous
> transaction and its subtransactions. Another is that you have to
> avoid an unacceptable slowdown in the tuple-visibility checks in the
> process.
It just occurs to me that this is the other potential use case for
bgworkers: autonomous transactions. Simply store any kind of state in
the bgworker and use one per autonomous transaction.
What's left to be done: implement communication between the controlling
backend (with the client connection) and the bgworker (imessages), drop
the bgworker's session to user privileges (and re-raise to superuser
after the job) and implement better error handling, as those would have
to be propagated back to the controlling backend.
Regards
Markus Wanner
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2010-09-16 09:19:47 | Re: autonomous transactions |
Previous Message | Markus Wanner | 2010-09-16 08:47:30 | Re: bg worker: patch 1 of 6 - permanent process |