On Sat, Sep 3, 2016 at 12:09 PM, Simon Riggs <si...@2ndquadrant.com> wrote: > So doing autonomous transactions inside a single backend doesn't gain > you very much, yet it is an enormously invasive patch to do it that > way, not least because it requires you to rewrite locking and > deadlocks to make them work correctly when proc is not 1:1 with xid. > And as Serge points out it introduces other restrictions that we know > about now, perhaps more as well.
Well using a separate process also requires rewriting locking and deadlock detection since a reasonable user might expect that second process to have access to data locked in their current transaction.The plus side is that we're already facing that issue with parallel query so at least it's something that only has to be solved once instead of a new problem. Parallel query is currently restricted to read-only queries however. Autonomous transactions will certainly need to be read-write so the question then is what problems led to the restriction in parallel query and are they any more tractable with autonomous transactions? -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers