Re: Remove redundant initialization of smgr pointer for relcache - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: Remove redundant initialization of smgr pointer for relcache
Date
Msg-id CAN4CZFP4zaFWXx2cP=X=6+VoDnoJ8Dh9cTpT4SjGdAAp=Ui2AQ@mail.gmail.com
Whole thread Raw
In response to Remove redundant initialization of smgr pointer for relcache  (Jingtang Zhang <mrdrivingduck@gmail.com>)
List pgsql-hackers
Hello!

This is a simple change, and should work correctly.

However, I think I would do more, as this part of the code is just confusing.

* AllocateRelationDesc only has one caller
* Its description comment only mentions some things it does, not all
of them. The call site explains it differently, but also not
completely.

I would at least also modify the comments so that they are only at one
place and explain the function correctly. But maybe it would be even
better to remove this function completely or to modify it so it's
usable at multiple places?



pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Race conditions in logical decoding
Next
From: Peter Eisentraut
Date:
Subject: Re: warning: dereferencing type-punned pointer