Re: [HACKERS] SELECT FOR UPDATE leaks relation refcounts - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] SELECT FOR UPDATE leaks relation refcounts
Date
Msg-id 200002031222.HAA20668@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] SELECT FOR UPDATE leaks relation refcounts  (wieck@debis.com (Jan Wieck))
List pgsql-hackers
> > The rewriter correctly passes SELECT FOR UPDATE locking from the
> > view to the referenced tables, but I'm not sure whether it is
> > bright enough to do the same for LOCK statements.  (Jan?)
> 
>     Isn't  LOCK  TABLE  a  utility  statement?  So  it doesn't go
>     through the rewriter.
> 
>     The LOCK code would have to do the  correct  locking  of  the
>     underlying  tables.  And  not  to  forget  cascaded  views or
>     possible subselects.
> 
>     Actually LockTableCommand() in command.c doesn't  do  it.  It
>     simply locks the view relation, what's definitely wrong.
> 
Added to TODO:
* Disallow LOCK on view 

--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Next
From: Chris
Date:
Subject: Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL