Re: Accessing an invalid pointer in BufferManagerRelation structure
| От | Álvaro Herrera |
|---|---|
| Тема | Re: Accessing an invalid pointer in BufferManagerRelation structure |
| Дата | |
| Msg-id | 202510191108.vl5bgq4j5usd@alvherre.pgsql обсуждение исходный текст |
| Ответ на | Re: Accessing an invalid pointer in BufferManagerRelation structure (Daniil Davydov <3danissimo@gmail.com>) |
| Ответы |
Re: Accessing an invalid pointer in BufferManagerRelation structure
|
| Список | pgsql-hackers |
On 2025-Apr-14, Daniil Davydov wrote: > On Wed, Mar 26, 2025 at 2:14 PM Stepan Neretin <slpmcf@gmail.com> wrote: > > The first thing we both noticed is that the macro calls a function > > that won't be available without an additional header. This seems a > > bit inconvenient. I think this is a fact of life. We don't have an automated check for such patterns anymore, so the users of the macro will have to include the other file. In any case I would rather they include utils/rel.h themselves, than forcing rel.h into every single file that includes bufmgr.h. > Well, I rebased the patch onto the latest `master` > (b51f86e49a7f119004c0ce5d0be89cdf98309141) and noticed that we don't > need to include `rel.h` in `localbuf.c` directly anymore, because > `#include lmgr.h` was added in memutils.h > I guess it solves this issue. Please, see v3 patch. Not anymore. I edited your comments a bit. What do you think of this version? I don't think this is backpatchable material, mainly because you said you don't see any situations in which relcache invalidations would occur in the middle of this. Can you can cause a problem to occur by adding an untimely invalidation somewhere without this patch, which is fixed by this patch? BTW how does this interact with SMgrRelation pinning? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Industry suffers from the managerial dogma that for the sake of stability and continuity, the company should be independent of the competence of individual employees." (E. Dijkstra)
Вложения
В списке pgsql-hackers по дате отправления: