From: | Greg Smith <gsmith(at)gregsmith(dot)com> |
---|---|
To: | Sebastjan Trepca <trepca(at)gmail(dot)com> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Deadlock in Postgres 8.2 |
Date: | 2008-01-20 21:54:52 |
Message-ID: | Pine.GSO.4.64.0801201650450.17332@westnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, 20 Jan 2008, Sebastjan Trepca wrote:
> we are spotting constant deadlocks when altering tables.
See http://www.postgresql.org/docs/8.2/interactive/explicit-locking.html
for information about the ACCESS EXCLUSIVE lock that ALTER TABLE takes.
Anything that is doing that needs to be in as short of a transaction as
possible, and it sounds like you have transactions that are lingering
around for way too long.
http://www.postgresql.org/docs/current/static/tutorial-transactions.html
is an intro to transaction timing.
You can look at who has locks on what using pg_locks, see
http://www.postgresql.org/docs/8.2/static/view-pg-locks.html
--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
From | Date | Subject | |
---|---|---|---|
Next Message | marcelo Cortez | 2008-01-20 22:08:01 | postgres 8.3 rc-1 ispell installation problem |
Previous Message | Greg Smith | 2008-01-20 21:48:54 | Re: postgres.org src build vs. enterprisedb installer |