Re: BUG #5412: test case produced, possible race condition. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5412: test case produced, possible race condition.
Date
Msg-id 24490.1271256576@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5412: test case produced, possible race condition.  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: BUG #5412: test case produced, possible race condition.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> According to the comments above RelationClearRelation(), if it's called
> with 'rebuild=true', the caller should hold a lock on the relation, i.e
> refcnt > 0. That's not the case in RelationFlushRelation() when it
> rebuilds a new relcache entry.

> Attached patch should fix that, by incrementing the reference count
> while the entry is rebuilt. It also adds an Assertion in
> RelationClearRelation() to check that the refcnt is indeed > 0.
> Comments?

Why would this patch fix anything?  It doesn't change the lock status.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Rusty Conover
Date:
Subject: Re: BUG #5412: test case produced, possible race condition.
Next
From: Tom Lane
Date:
Subject: Re: BUG #5412: test case produced, possible race condition.