Re: cache state reset

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: cache state reset
Дата
Msg-id 4389.1033144802@sss.pgh.pa.us
обсуждение исходный текст
Ответ на cache state reset  (David Lobron <dlobron@akamai.com>)
Список pgsql-general
David Lobron <dlobron@akamai.com> writes:
> I've recently begun seeing an unusually high number of error messages
> from my database, of this type:
> NOTICE:  InvalidateSharedInvalid: cache state reset

> I noticed in the archives that people have asked about this issue before,
> but my case seems a bit different, in that my errors do not seem related
> to any database vacuuming.  Tom Lane noted in one of his archived replies
> that these messages can sometimes be caused by applications with very long
> database access times.  I'm running a series of cron'ed Perl tools, each
> of which opens a connection to Postgres for up to 5 minutes.  Could this
> be the problem?

If it sits in an open transaction for a long time, then it could be the
problem.  Single queries that run for a long time might cause it too,
depending on what they're doing.

> More generally: what is a cache state reset, and what might trigger
> one?

It's not really anything to worry about, if you are using a recent
Postgres release (7.1 is probably safe).  It just means that some
backend was slow about absorbing cache-invalidation notices, leading
to overflow of the internal cache-invalidation message queue.  When
this happens we clear the queue and send a "forget *everything* you've
cached" (ie, cache reset) message instead, to ensure that nothing that
should have been invalidated fails to get invalidated.

If you see a heck of a lot of these (like, say, one every few seconds)
then you might be taking enough of a performance hit to worry about
fixing the cause.  Otherwise ignore it.

            regards, tom lane

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: multi-database
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [JDBC] Prepared statement performance...