Re: Autonomous Transaction is back

From: Noah Misch <noah(at)leadboat(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Autonomous Transaction is back
Date: 2015-08-22 06:23:02
Message-ID: 20150822062302.GB2245777@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 21, 2015 at 10:06:44AM -0400, Robert Haas wrote:
> On Tue, Aug 18, 2015 at 3:06 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> > On Tue, Aug 18, 2015 at 8:17 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> >> On Sat, Aug 15, 2015 at 6:47 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> >>> [1] That's not to say it must use the shmem lock structures and deadlock
> >>> detector.
> >>
> >> This footnote goes to my point.

> >> So, I agree that this scenario should be an error. What I don't agree
> >> with is the idea that it should be the deadlock detector's job to
> >> throw that error.

I couldn't gather from your earlier messages that this scenario should get an
error, so I'm glad to have that clarified.

> > Can you get away with only looking at tuples though? For example,
> > what about advisory locks? Table locks?
>
> Well, that's an interesting question. Can we get away with regarding
> those things as non-conflicting, as between the parent and child
> transactions?

For system lock types, no. While one could define advisory locks to work
differently, we should assume that today's advisory lockers have expectations
like those of system lockers. An autonomous transaction should not bypass any
lock that a transaction of another backend could not bypass.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2015-08-22 06:39:36 Re: PATCH: numeric timestamp in log_line_prefix
Previous Message Noah Misch 2015-08-22 06:16:17 Re: Test code is worth the space