From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Another nasty cache problem |
Date: | 2000-01-30 21:56:14 |
Message-ID: | 200001302156.QAA19093@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Now, if we did proper locking, no SI message could arrive for such an
> > entry.
>
> > My assumption is that these are mostly system cache entries, and they
> > rarely change, right? If someone is operating on a table that gets an
> > SI entry, odds are that later on the system will fail because the table
> > is changed in some way, right?
>
> If the tuple is actually *changed* then that's true (and locking should
> have prevented it anyway). But we also issue cache flushes against
> whole system tables in order to handle VACUUM of a system table. There,
> the only thing that's actually been modified is the tuple's physical
> location (ctid). We don't want to blow away transactions that are just
> looking at cache entries when a VACUUM happens.
>
> Perhaps the caches shouldn't store ctid? Not sure.
I am guilt of that. There are a few place where I grab the tuple from
the cache, then use that to update the heap. I thought it was a nifty
solution at the time. I thought I used the CacheCopy calls for that,
but I am not positive. Even if I did, that doesn't help because the
copy probably has an invalid tid at that point, thought I have opened
the table. Maybe I have to make sure I open the table before geting the
tid from the cache.
Is it only the tid that is of concern. If so, that can probably be
fixed somehow.
--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Ed Loehr | 2000-01-30 22:03:11 | [GENERAL] float4 confused as int?? |
Previous Message | Tom Lane | 2000-01-30 21:54:14 | Re: [HACKERS] Another nasty cache problem |