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

Re: [HACKERS] Another nasty cache problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Another nasty cache problem
Date: 2000-01-30 18:22:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Yes, I have always been aware of this problem.  The issue is that since
> cache entries are removed on a oldest-removed-first basis, I never
> thought that several cache lookups would be a problem.

They're not, under normal circumstances...

> However, a full reset of the cache could cause major problems.  Is there
> a way to re-load the cache after the reset with the most recently cached
> entries?  Seems that would be easier.  However, your issue is probably
> that the new cache entries would have different locations from the old
> entries.  Is it possible to delay the cache reset of the five most
> recent cache entries, and do them later?

I don't think that's a good answer; what if one of those entries is the
one that the SI messages wanted us to update?  With a scheme like that,
you might be protecting a cache entry that actually isn't being used
anymore.  With a refcount you'd at least know whether it was safe to
throw the entry away.

Of course this just begs the question of what to do when an SI update
message arrives for a tuple that is locked down by refcount.  Maybe
we have to kick out an elog(ERROR) then.  Could be messy.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2000-01-30 19:25:29
Subject: Re: [HACKERS] Another nasty cache problem
Previous:From: Bruce MomjianDate: 2000-01-30 17:57:58
Subject: Re: [HACKERS] Another nasty cache problem

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