Re: PostgreSQL 9.0.4 blocking in lseek?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL 9.0.4 blocking in lseek?
Дата
Msg-id 9398.1319761978@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL 9.0.4 blocking in lseek?  (Sören Meyer-Eppler <soerenme@google.com>)
Ответы Re: PostgreSQL 9.0.4 blocking in lseek?
Re: PostgreSQL 9.0.4 blocking in lseek?
Список pgsql-performance
=?ISO-8859-1?Q?S=F6ren_Meyer-Eppler?= <soerenme@google.com> writes:
> A fairly complex insert query on an empty destination table will run for
> an indefinite amount of time (we waited literally days for the query to
> complete). This does not happen every time we run the query but often.
> Now ordinarily I'd assume we did something wrong with our indices or
> query, but the execution plan looks sane and, more tellingly, we have:
> - no CPU load
> - no network traffic
> - no disk I/O
> - no other load on the server except this single query
> and strace displaying a seemingly endless list of lseek calls.

> So my assumption is that we are not running into bad Big-O() runtime
> behavior but rather into some locking problem.

If it were blocked on a lock, it wouldn't be doing lseeks().

The most obvious explanation for a backend that's doing repeated lseeks
and nothing else is that it's repeatedly doing seqscans on a table
that's fully cached in shared buffers.  I'd wonder about queries
embedded in often-executed plpgsql functions, for instance.  Can you
identify which table the lseeks are issued against?

(Now, having said that, I don't see how that type of theory explains no
CPU load.  But you're really going to need to provide more info before
anyone can explain it, and finding out what the lseeks are on would be
one good step.)

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Samuel Gendler
Дата:
Сообщение: Re: backups blocking everything
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: PostgreSQL 9.0.4 blocking in lseek?