Re: VACUUM for TOASTed objects

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: VACUUM for TOASTed objects
Дата
Msg-id CAB7nPqQ7GpVO1oFqmHnDv9wxmVMswb8zZDs8h2p29BDhsZ3WUA@mail.gmail.com
обсуждение исходный текст
Ответ на VACUUM for TOASTed objects  (Soroosh Sardari <soroosh.sardari@gmail.com>)
Список pgsql-hackers
On Wed, Nov 20, 2013 at 5:46 PM, Soroosh Sardari
<soroosh.sardari@gmail.com> wrote:
> Hi
>
> The vacuum procedure do rewrite for a table but, what happened if the table
> has some TOASTed columns?
>
> Please, help me to find a module or function in source code which is
> responsible for
> vaccuming the TOAST relation.
A toast table is vacuumed with its master table when vacuum is done on
this master table. Have a look at vacuum.c:1150~:       /*        * If the relation has a secondary toast rel, vacuum
thattoo while we        * still hold the session lock on the master table.  Note however that        * "analyze" will
notget done on the toast table.      This
 
is good, because        * the toaster always uses hardcoded index access and statistics are        * totally
unimportantfor toast relations.        */       if (toast_relid != InvalidOid)               vacuum_rel(toast_relid,
vacstmt,false, for_wraparound);
 
Regards,
-- 
Michael



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

Предыдущее
От: Amit Khandekar
Дата:
Сообщение: Re: COPY table FROM STDIN doesn't show count tag
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1