Re: Autonomous Transaction is back
От | Merlin Moncure |
---|---|
Тема | Re: Autonomous Transaction is back |
Дата | |
Msg-id | CAHyXU0x8X2-iwTzJFzSjRDHR8j2TuK8AwT2kPhJ=8HA+vRGNDw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Autonomous Transaction is back (Noah Misch <noah@leadboat.com>) |
Список | pgsql-hackers |
On Sun, Sep 6, 2015 at 12:56 AM, Noah Misch <noah@leadboat.com> wrote: > My comments have flowed out of a principle that autonomous transactions shall > have precisely the same semantics as using another backend via dblink. That's what I thought, too. AT is syntax sugar for dblink approach. Syntax and performance aside, I think the only way dblink style AT could be improved would be to have: 1) better cancel handling, especially cancel child when parent cancels (this is a major headache with dblink) 2) automatic rejection of acquire attempts by child on exclusive assets held by parent #2 is what we've been discussing, but I'm pretty confused. Most especially I'm not clear on whether parent and children share a pid or have unique pid. If pids are unique as in dblink, #2 could be done via a query assuming you have a way of identifying child transactions in pg_stat_activity. The discussion has suggested that the pid is shared, which I found odd but took on faith. I'm also wondering if we need syntax to handle synchronous vs asynchronous execution of the AT (the latter of which is only possible with a separate PID, I think). merlin
В списке pgsql-hackers по дате отправления: