Subject: concurrency control docs error

From: Neil Conway <[email-masked]>
Date: 11 Nov 2002 16:02:51 -0500

The docs on concurrency control & deadlocks (User's Guide, 9.3.3, CVS
docs) state the following:

  Use of explicit locking can cause deadlocks, wherein two (or more)
  transactions each hold locks that the other wants.

This isn't completely true, as deadlocks can occur in applications
that don't use explicit 'LOCK' statements.

Can someone suggest a better way to phrase the intent of that
statement?

Cheers,

Neil

-- 
Neil Conway <[email-masked]> || PGP Key ID: DB3C29FC

---

From: Bruce Momjian <[email-masked]>
Date: Mon, 11 Nov 2002 23:45:40 -0500 (EST)

> Can someone suggest a better way to phrase the intent of that

But it isn't saying there aren't other deadlock cases, just that
explicit locks tend to cause them more frequently.  You can add "Often"
to the front of the sentence.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email-masked]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---

From: Neil Conway <[email-masked]>
Date: 12 Nov 2002 00:12:19 -0500

Bruce Momjian <[email-masked]> writes:
> explicit locks tend to cause them more frequently.

Well, it doesn't refer to "frequently", or "more often". It just says:

        Doing x can lead to y.

While that statement doesn't imply anything about other things that
can lead to y, a lot of people will take that for granted --
especially if the docs don't mention anything else that might produce
y.

I'll write up something and send it to -patches...

Cheers,

Neil

---

From: Thomas Lockhart <[email-masked]>
Date: Tue, 12 Nov 2002 05:47:19 +0000

Try something like:

Explicit locks can increase the likelyhood of deadlock conditions...

                  - Thomas