From: | "Lee Wu" <Lwu(at)mxlogic(dot)com> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | reindex and copy - deadlock? |
Date: | 2004-06-08 16:14:37 |
Message-ID: | ECAB83AA52BCC043A0E24BBC00001024111224@mxhq-exch.corp.mxlogic.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
We often experience with the problem that reindex
cannot be finished in our production database.
It's typically done with 30 minutes. However,
sometimes, when there is another "COPY" process,
reindex will not finish. By monitoring the CPU
time reindex takes, it does not increase at all.
That seems a deadlock. But the following query shows
only reindex process (23127)is granted lock while
COPY process (3149) is not.
Last time when we have this problem and kill
reindex process and COPY process does not work.
We had to bounce the database server.
As you know, when reindex is running, nobody can
access the table.
Can someone kindly help?
Thanks,
Here is lock info from database:
replace | database | transaction | pid
| mode | granted
-----------------------+----------+-------------+-------+---------------
------+---------
email | 17613 | |
3149 | RowExclusiveLock | f
email_cre_dom_idx | 17613 | |
23127 | ExclusiveLock | t
email_cid_cre_idx | 17613 | |
23127 | ShareLock | t
email_cid_cre_idx | 17613 | |
23127 | AccessExclusiveLock | t
email | 17613 | |
23127 | ShareLock | t
email | 17613 | |
23127 | AccessExclusiveLock | t
email_cid_cre_dom_idx | 17613 | |
23127 | ShareLock | t
email_cid_cre_dom_idx | 17613 | |
23127 | AccessExclusiveLock | t
email_did_cre_idx | 17613 | |
23127 | ShareLock | t
email_did_cre_idx | 17613 | |
23127 | AccessExclusiveLock | t
email_cre_dom_idx | 17613 | |
23127 | AccessExclusiveLock | t
(11 rows)
Here are the processes of 3149 and 23127 from OS:
postgres 3149 1.3 6.4 154104 134444 ? S
Jun03 92:04 postgres: postgres db1 xx.xx.xx.xx COPY
waiting
postgres 23127 3.2 9.3 228224 194512 ? S
03:35 15:03 postgres: postgres db1 [local] REINDEX
Here are queries from database:
23127 | REINDEX table email
3149 | COPY email (...) FROM stdin
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Hoover | 2004-06-08 16:51:18 | Help requeted with abend. |
Previous Message | lise chhay | 2004-06-08 13:21:47 | configure: error: no argument expected for --with-tcl option |