Re: Proposal : REINDEX SCHEMA
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: Proposal : REINDEX SCHEMA |
Дата | |
Msg-id | CAFcNs+pM3hYCMUgX4rvw7dZdBT0V=h_zQa7pn0HNKSAN6_tPdQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Proposal : REINDEX SCHEMA (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: Proposal : REINDEX SCHEMA
(Sawada Masahiko <sawada.mshk@gmail.com>)
|
Список | pgsql-hackers |
<div dir="ltr"><div class="gmail_extra">On Sun, Oct 12, 2014 at 2:27 PM, Stephen Frost <<a href="mailto:sfrost@snowman.net">sfrost@snowman.net</a>>wrote:<br />><br />> * Alvaro Herrera (<a href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>)wrote:<br />> > Sawada Masahiko wrote:<br />>> > Attached WIP patch adds new syntax REINEX SCHEMA which does reindexing<br />> > > all table of specifiedschema.<br />> > > There are syntax dose reindexing specified index, per table and per database,<br />>> > but we can not do reindexing per schema for now.<br />> ><br />> > It seems doubtful that therereally is much use for this feature, but if<br />> > there is, I think a better syntax precedent is the new ALTERTABLE ALL<br />> > IN TABLESPACE thingy, rather than your proposed REINDEX SCHEMA.<br />> > Something likeREINDEX TABLE ALL IN SCHEMA perhaps.<br />><br />> Yeah, I tend to agree that we should be looking at the 'ALLIN<br />> TABLESPACE' and 'ALL IN SCHEMA' type of commands to keep things<br />> consistent. This might be analternative for the vacuum / analyze /<br />> reindex database commands also..<br />><br /><br /></div><div class="gmail_extra">Somereview:<br /><br /></div><div class="gmail_extra">1) +1 to "REINDEX ALL IN SCHEMA name"<br /><br/></div><div class="gmail_extra"><br />2) IMHO the logic should be exactly the same as REINDEX DATABASE, including thetransaction control. Imagine a schema with a lot of tables, you can lead to a deadlock using just one transaction block.<br/></div><div class="gmail_extra"><br /><br />3) The patch was applied to master and compile without warnings<br/><br /></div><div class="gmail_extra"><br />4) Typo (... does not have any table)</div><div class="gmail_extra"><br/>+ if (!reindex_schema(heapOid))<br />+ ereport(NOTICE,<br />+ (errmsg("schema\"%s\"does not hava any table",<br />+ schema->relname)));<br /><br /><br /></div><divclass="gmail_extra">5) Missing of regression tests, please add it to src/test/regress/sql/create_index.sql<br/></div><div class="gmail_extra"><br /></div><div class="gmail_extra">6) You needto add psql complete tabs<br /><br /></div><div class="gmail_extra">7) I think we can add "-S / --schema" option do reindexdbin this patch too. What do you think?<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 по дате отправления: