Re: Autonomous Transaction (WIP)
От | Andres Freund |
---|---|
Тема | Re: Autonomous Transaction (WIP) |
Дата | |
Msg-id | 20140408201930.GZ4161@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: Autonomous Transaction (WIP) (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On 2014-04-08 16:13:21 -0400, Tom Lane wrote: > Robert Haas <robertmhaas@gmail.com> writes: > > I'm also pretty unconvinced that multiple PGPROCs is the right way to > > go. First, PGPROCs have a bunch of state in them that is assumed to > > exist once per backend. We might find pretty substantial code churn > > there if we try to go change that. Second, why do other backends > > really need to know about our ATs? As far as I can see, if other > > backends see the AT as a subtransaction of our top-level transaction > > up until it actually commits, that ought to be just fine. > > If we can make it work like that, sure. I'm a bit worried about how you'd > decouple a subtransaction and commit it atomically ... or if that's not > atomic, will it create any problems? The point being that you need to > change both pg_subtrans and pg_clog to make that state transition. I think it can be made work sensibly - while those states are changed it will still appear to be running via the procarray. There's some fun around suboverflowed entries, but I think that can be handled by reserving an entry for autonomous transactions. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: