Re: reindex and copy - deadlock?

От: Tom Lane
Тема: Re: reindex and copy - deadlock?
Дата: ,
Msg-id: 2960.1086713228@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: reindex and copy - deadlock?  (Litao Wu)
Ответы: Re: reindex and copy - deadlock?  (Litao Wu)
Список: pgsql-performance

Скрыть дерево обсуждения

Join slow on "large" tables  (Josué Maldonado, )
 Re: Join slow on "large" tables  (Josh Berkus, )
  Re: Join slow on "large" tables  (Josué Maldonado, )
   Re: Join slow on "large" tables  (Josh Berkus, )
    Re: Join slow on "large" tables  (Josué Maldonado, )
   Re: Join slow on "large" tables  (Tom Lane, )
 Re: Join slow on "large" tables  ("Scott Marlowe", )
  Re: Join slow on "large" tables  (Josué Maldonado, )
   reindex and copy - deadlock?  (Litao Wu, )
    Re: reindex and copy - deadlock?  (Tom Lane, )
     Re: reindex and copy - deadlock?  (Litao Wu, )
      Re: reindex and copy - deadlock?  (Tom Lane, )
       Re: reindex and copy - deadlock?  (Litao Wu, )
        Re: reindex and copy - deadlock?  (Tom Lane, )
         Re: reindex and copy - deadlock?  (Litao Wu, )
          Re: reindex and copy - deadlock?  (Tom Lane, )
           Re: reindex and copy - deadlock?  (Litao Wu, )
            Re: reindex and copy - deadlock?  (Tom Lane, )
           Re: reindex and copy - deadlock?  (Litao Wu, )
            Re: reindex and copy - deadlock?  (Tom Lane, )
             Re: reindex and copy - deadlock?  (Litao Wu, )
              Re: reindex and copy - deadlock?  (Tom Lane, )
               Re: reindex and copy - deadlock?  (Litao Wu, )
                Re: reindex and copy - deadlock?  (Tom Lane, )
                 network address query  (Litao Wu, )
   Re: Join slow on "large" tables  ("Scott Marlowe", )

Litao Wu <> 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 по дате сообщения:

От:
Дата:
Сообщение: RamDisk
От: Greg Stark
Дата:
Сообщение: Re: Use of Functional Indexs and Planner estimates