Jan Wieck <janwieck(at)yahoo(dot)com> writes:
> I'm about 99.666667% sure that the lock type choosen in the
> FOR UPDATE case (line 511 of parse_relation.c) should be
> RowExclusiveLock instead of RowShareLock. Actually I get
> "Deadlock risk" debug messages when selecting FOR UPDATE and
> then really UPDATE.
> Should I change it?
Not sure, but if you do change it, that's *not* the only place. I coded
that as RowShareLock because that was what was getting grabbed by the
executor for SELECT FOR UPDATE. I believe the rewriter may need changed
as well, since it can also be the first grabber of a lock for a rel.
Note also that the docs say SELECT FOR UPDATE gets RowShareLock!
The "deadlock risk" message is not very bright, and I wouldn't suggest
changing the code just because of that. I'm not even sure I want to
leave that check in the release version ...
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Oleg Bartunov||Date: 2000-12-04 20:36:32|
|Subject: Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ? |
|Previous:||From: Tom Lane||Date: 2000-12-04 20:29:19|
|Subject: Re: Using Threads? |