Re: Accessing an invalid pointer in BufferManagerRelation structure
| От | Daniil Davydov | 
|---|---|
| Тема | Re: Accessing an invalid pointer in BufferManagerRelation structure | 
| Дата | |
| Msg-id | CAJDiXgiQXRWZ+n=fHaLqzLkGt6y9DY4_HPELPwaq3AVcFGYKtA@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: Accessing an invalid pointer in BufferManagerRelation structure (Álvaro Herrera <alvherre@kurilemu.de>) | 
| Ответы | 
                	
            		Re: Accessing an invalid pointer in BufferManagerRelation structure
            		
            		 | 
		
| Список | pgsql-hackers | 
Hi, On Sun, Oct 19, 2025 at 6:32 PM Álvaro Herrera <alvherre@kurilemu.de> wrote: > > I edited your comments a bit. What do you think of this version? > Thanks for looking into this! All added changes LGTM. > 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? Yep, by now (if I did not miss anything) described problem cannot occur even with debug_discard_caches parameter on. But one of our clients had faced this problem, because we have some differences in source code. In the first letter I described scenario, when the occurrence of a problem becomes possible : *** if (just for example) we add acquiring of new lock into ExtendBufferedRelLocal or ExtendBufferedRelShared, relation cache will be invalidated (inside AcceptInvalidationMessages). *** > > BTW how does this interact with SMgrRelation pinning? Hm, maybe I don't fully understand the question. Smgr pinning is one of the side effects of BMR_GET_SMGR (in case we use this macro with invalidated/uninitialized rd_smgr entry). Without patch pincount cannot save us from undesirable invalidation, because it guards from smgr_destroy, not from smgr_release. -- Best regards, Daniil Davydov
В списке pgsql-hackers по дате отправления: