Heikki Linnakangas <hlinn...@iki.fi> writes:
> In commit af0e7deb4a, I removed the call to RelationCloseSmgr() from 
> RelationCacheInvalidate(). I thought it was no longer needed, because we 
> no longer free the underlying SmgrRelation.

> However, it meant that if the relfilenode of the relation was changed, 
> the relation keeps pointing to the SMgrRelation of the old relfilenode. 
> So we still need the RelationCloseSmgr() call, in case the relfilenode 
> has changed.

Ouch.  How come we did not see this immediately in testing?  I'd have
thought surely such a bug would be exposed by any command that
rewrites a heap.

                        regards, tom lane


Reply via email to