On Fri, Feb 03, 2006 at 10:27:30AM -0500, Tom Lane wrote:
> Basically: it's the user's fault if he says "TRUNCATE t2" in a situation
> where the referent of t2 might be changing concurrently. But once
> you've identified t2, it's your fault if you don't track the
> dependencies of t2 correctly, even if someone else is busy renaming them.
Ok, the attached patch now does it correctly as suggested by Alvaro.
For code simplicity I changed the locking order of the tables in the
RESTRICT-case as well.
Before they got locked and then checked one by one. To simplify integration
of the CASCADE-case however, I changed it to lock all - check all.
So it is now:
lock direct - add and lock cascaded tables - check all - truncate all
lock direct (= all) - check all - truncate all.
In response to
pgsql-patches by date
|Next:||From: Stephen Frost||Date: 2006-02-05 17:53:01|
|Subject: Re: Krb5 & multiple DB connections|
|Previous:||From: Andrew Dunstan||Date: 2006-02-05 16:15:42|
|Subject: Re: drop if exists remainder|