Re: cache state reset

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Lobron <dlobron(at)akamai(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: cache state reset
Date: 2002-09-27 16:40:02
Message-ID: 4389.1033144802@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Lobron <dlobron(at)akamai(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-09-27 16:41:14 Re: [JDBC] Prepared statement performance...
Previous Message Joe Conway 2002-09-27 16:35:48 Re: multi-database