Re: table level locking different in 7.0? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: table level locking different in 7.0?
Date
Msg-id 200005180229.WAA23482@candle.pha.pa.us
Whole thread Raw
In response to Re: table level locking different in 7.0?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Jim Mercer <jim@reptiles.org> writes:
> > i had several concurrent processes which would do inserts via COPY and
> > queries.
> > on that system, i don't recall the COPY processes as being blocked by the 
> > query processes.
> > now i'm running that app on solaris 7 with pgsql 7.0.
> > i'm finding that a big long select is blocking other processes which
> > are doing COPY's.
> 
> Hmm.  In 7.0, COPY IN acquires an exclusive lock on the target table,
> which is something I put in in a fit of paranoia.  It may not really
> be necessary --- probably a regular write lock would be good enough.
> (6.5's COPY code neglected to acquire any lock at all, which is surely
> *not* good enough, but maybe I overreacted.)

I see no reason a write lock would not be good enough, unless we do some
special stuff in copy which I have forgotten.

--  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: Tom Lane
Date:
Subject: Re: table level locking different in 7.0?
Next
From: Bruce Momjian
Date:
Subject: Re: table level locking different in 7.0?