Re: SearchSysCacheTuple(Copy) - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: SearchSysCacheTuple(Copy)
Date
Msg-id 3A10F6B6.FF40B0ED@tpf.co.jp
Whole thread Raw
In response to SearchSysCacheTuple(Copy)  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Responses Re: SearchSysCacheTuple(Copy)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Isn't it practical to replace all susipicious Search
> > SysCacheTuple() by SearchSysCacheTupleCopy() ?
>
> That would replace a rare failure condition by a not-at-all-rare
> memory leak.  I'm not sure there'd be a net gain in reliability :-(

> A more serious objection to SearchSysCacheTupleCopy is that once the
> tuple is copied out of the syscache, there isn't any mechanism to
> detect whether it's still valid.  If an SI message arrives for a
> recently-copied tuple, we have no way to know if we have a problem
> or not.
>

Is it more serious than doing the wrong thing silently ?
Is it more serious than forcing database restart ?
We couldn't handle SI messages immediately.
Cache machanism couldn't gurantee the validty of
tuples without some locking mechanism in the first
place.

Regards.
Hiroshi Inoue



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SearchSysCacheTuple(Copy)
Next
From: Larry Rosenman
Date:
Subject: Re: Syslog Facility Patch