Re: [HACKERS] Re: Freezing docs for v6.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Vadim Mikheev <vadim(at)krs(dot)ru>, Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: Freezing docs for v6.5
Date: 1999-06-04 03:19:26
Message-ID: 12252.928466366@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
>> I suspect that this is an instance of a generic problem with *all*
>> the SysCache tables, and perhaps the relcache as well: there is no
>> mechanism to ensure that the caches stay in sync with the underlying
>> relation during an abort.

Actually, there is such a mechanism: I find that the "shared
invalidation" manager has the right sorts of hooks into the SysCache
stuff. It appears that once a tuple has been committed, the SI code
will ensure that it gets flushed from all the backends' caches if it
is modified. The problem comes up when a backend creates a tuple,
causes it to be loaded into SysCache, and then aborts, all within
one transaction. The SI code doesn't handle that case, for reasons
that are not clear to me.

Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> Other backends don't see the rows until they are committed, but we do
> see them because they are part of our own transaction.

Yes, this seems to be a key part of the problem.

The fix I just committed seems to cure the known cases, but it is
not elegant. I now think that the *real* problem is somewhere in
the sinval code. But I'm not inclined to try to solve it for 6.5.

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1999-06-04 03:20:58 Re: [HACKERS] Ye olde "relation doesn't quite exist" problem
Previous Message Vadim Mikheev 1999-06-04 03:19:00 Re: [HACKERS] Re: Freezing docs for v6.5