Re: Revised Patch to allow multiple table locks in "Unison"

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Padgett <npadgett(at)redhat(dot)com>, Fernando Nasser <fnasser(at)cygnus(dot)com>, "pgsql-patches(at)postgresql(dot)org" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Revised Patch to allow multiple table locks in "Unison"
Date: 2001-08-04 22:03:31
Message-ID: 200108042203.f74M3Vx26380@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


I have backed out the entire patch. I think it is best for the author
to make the suggested changes and resubmit. Reversed patch attached.

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Patch applied.
>
> Idly looking this over again, I noticed a big OOPS:
>
> >> ! freeList(lockstmt->rellist);
>
> >> ! pfree(relname);
>
> >> ! pfree(relname);
>
> It is most definitely NOT the executor's business to release pieces of
> the querytree; this will certainly break plpgsql functions, for example,
> where the same querytree is executed repeatedly.
> Bruce, please remove those lines.
>
> Another thing I am concerned about now that I look more closely is that
> the multi-rel case code opens the relations without any lock, and then
> assumes they'll stick around while it opens and access-checks the rest.
> This will fail if someone else drops one of the rels meanwhile. I think
> the entire routine should be reduced to a simple loop that opens, locks,
> and closes the rels one at a time. The extra code bulk to do it this
> way isn't buying us anything at all.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 10.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Barry Lind 2001-08-04 23:41:59 Question about todo item
Previous Message Tom Lane 2001-08-04 19:51:36 Re: Revised Patch to allow multiple table locks in "Unison"

Browse pgsql-patches by date

  From Date Subject
Next Message Serguei Mokhov 2001-08-04 22:20:45 Re: libpq.pot -> ru.po : Russian - Cyrillic - KOI8-R
Previous Message Tom Lane 2001-08-04 19:51:36 Re: Revised Patch to allow multiple table locks in "Unison"