Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group