Re: [HACKERS] Breakage with VACUUM ANALYSE + partitions
От | Andres Freund |
---|---|
Тема | Re: [HACKERS] Breakage with VACUUM ANALYSE + partitions |
Дата | |
Msg-id | 20160411165054.r35o4fjicdg4avs7@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Breakage with VACUUM ANALYSE + partitions (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: [HACKERS] Breakage with VACUUM ANALYSE + partitions
|
Список | pgsql-bugs |
On 2016-04-04 12:45:25 -0400, Robert Haas wrote: > Well, I agree that it's pretty strange that _mdfd_getseg() makes no > such check, but I still don't think I understand what's going on here. > Backends shouldn't be requesting nonexistent blocks from a relation - > higher-level safeguards, like holding AccessExclusiveLock before > trying to complete a DROP or TRUNCATE - are supposed to prevent that. I don't think that's really true: We write blocks back without holding any sort of relation level locks; and thus do _mdfd_getseg() type accesses as well. And we're not really "requesting nonexistant blocks" - the segments are just opened to get the associated file descriptor, and they're opened with EXTENSION_RETURN_NULL. It turns out to be important performance-wise to reuse fd's when triggering kernel writeback. > If this patch is causing us to hold onto smgr references to a relation > on which we no longer hold locks, I think that's irretrievably broken > and should be reverted. I really doubt this will be the only thing > that goes wrong if you do that. As we already have done that for writes for a long time, I'm a bit surprised about that statement. Greetings, Andres Freund
В списке pgsql-bugs по дате отправления: