Re: reindex and copy - deadlock? - Mailing list pgsql-performance

From Tom Lane
Subject Re: reindex and copy - deadlock?
Date
Msg-id 2960.1086713228@sss.pgh.pa.us
Whole thread Raw
In response to reindex and copy - deadlock?  (Litao Wu <litaowu@yahoo.com>)
Responses Re: reindex and copy - deadlock?  (Litao Wu <litaowu@yahoo.com>)
List pgsql-performance
Litao Wu <litaowu@yahoo.com> writes:
> 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.

There is no deadlock visible in your report: the reindex process is not
waiting for a lock, according to either ps or pg_locks.  You sure it's
not just slow?  I'd expect reindex to be largely I/O bound, so the lack
of CPU activity doesn't prove much.

If you think it's actually stuck waiting for something, try attaching to
the REINDEX backend process with gdb to get a stack trace.  That would
at least give some idea what it's waiting for.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Join slow on "large" tables
Next
From: Litao Wu
Date:
Subject: Re: reindex and copy - deadlock?