Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED |
Дата | |
Msg-id | CAFcNs+oOZN7DoUeJ7ZkWjVKHf4zOu6W1QqR1s9X4RPsD22btAQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED
|
Список | pgsql-hackers |
<div dir="ltr"><div class="gmail_extra"><br />On Fri, Aug 22, 2014 at 4:45 PM, Alvaro Herrera <<a href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>>wrote:<br />><br />> > 2. The patch seemsto think that it can sometimes be safe to change<br /> > > the relpersistence of an existing relation. Unlessyou can be sure<br />> > that no buffers can possibly be present in shared_buffers and nobody<br />> >will use an existing relcache entry to read a new one in, it's not,<br /> > > because the buffers won't have theright BM_PERSISTENT marking. I'm<br />> > very nervous about the fact that this patch seems not to have touched<br/>> > bufmgr.c, but maybe I'm missing something.<br /> ><br />> Right. Andres pointed this out previously,and the patch was updated<br />> consequently. The only remaining case in which we do that, again AFAIR,<br/>> is for indexes, just after the table has been rewritten and just before<br /> > the indexes are reindexed. There should be no buffer access of the old<br />> indexes at that point, so there would be no buffer markedwith the wrong<br />> flag. Also, the table is locked access-exclusively (is that a word?),<br /> > so no othertransaction could possibly be reading buffers for its<br />> indexes.<br />><br />> I pointed out, in the emailjust before pushing the patch, that perhaps<br />> we should pass down the new relpersistence flag into finish_heap_swap,<br/> > and from there we could pass it down to reindex_index() which is where<br />> it would beneeded. I'm not sure it's worth the trouble, but I think we<br />> can still ask Fabrizio to rework that part.<br />><br/> > Maybe it is me missing something.<br />><br />> BTW why is it that index_build() checks the heap'srelpersistence flag<br />> rather than the index'?<br />><br /><br /></div><div class="gmail_extra">I can reworkthis part if it's a real concern.<br /></div><div class="gmail_extra"><br /></div><div class="gmail_extra">Regards,<br/></div><div class="gmail_extra"><br />--<br />Fabrízio de Royes Mello<br />Consultoria/CoachingPostgreSQL<br />>> Timbira: <a href="http://www.timbira.com.br">http://www.timbira.com.br</a><br/> >> Blog: <a href="http://fabriziomello.github.io">http://fabriziomello.github.io</a><br/>>> Linkedin: <a href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/>>> Twitter: <a href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a><br/> >> Github: <a href="http://github.com/fabriziomello">http://github.com/fabriziomello</a></div></div>
В списке pgsql-hackers по дате отправления: