Re: VACUUM's ancillary tasks

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: VACUUM's ancillary tasks
Дата
Msg-id CAEepm=1jASR6hz6ovUQHEXYuD9i4ssoq1nXsjtW6bgjxHuMB0w@mail.gmail.com
обсуждение исходный текст
Ответ на VACUUM's ancillary tasks  (Vik Fearing <vik@2ndquadrant.fr>)
Ответы Re: VACUUM's ancillary tasks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
<div dir="ltr">On Mon, Aug 29, 2016 at 1:26 PM, Vik Fearing <<a
href="mailto:vik@2ndquadrant.fr">vik@2ndquadrant.fr</a>>wrote:<br />> While doing this, I noticed that ALTER
TABLEshould also re-analyze the<br />> table for obvious reasons, so I have that one set<br />>
"changes_since_analyze"to the number of rows rewritten as well.<br /><br />I noticed that ATExecAlterColumnType does
this:<br/><br />    /*                                                                         <br />     * Drop any
pg_statisticentry for the column, since it's now wrong type   <br />     */                                            
                          <br />    RemoveStatistics(RelationGetRelid(rel), attnum);  <br /><br />What if there is no
rewrite,because the type is binary compatible (ATColumnChangeRequiresRewrite returns false)?  Then I think your patch
won'tattract an autovacuum daemon to ANALYZE the table and produce new statistics, because it won't
touch changes_since_analyze. I wonder if we should simply keep the stats if no rewrite is required.  Aren't the
statisticalproperties of binary-compatible types also compatible?  Alternatively, we should consider bumping
changes_since_analyzein this case too, if you're going to do it in the rewrite case.<br /><br />-- <br />Thomas
Munro<br/><a href="http://www.enterprisedb.com">http://www.enterprisedb.com</a></div> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Enrique Meneses
Дата:
Сообщение: Re: Allowing GIN array_ops to work on anyarray
Следующее
От: Robert Haas
Дата:
Сообщение: Re: store narrow values in hash indexes?