Re: stats collector suddenly causing lots of IO

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: stats collector suddenly causing lots of IO
Дата
Msg-id 10744.1271435146@sss.pgh.pa.us
обсуждение исходный текст
Ответ на stats collector suddenly causing lots of IO  (Chris <lists@deksai.com>)
Ответы Re: stats collector suddenly causing lots of IO  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Josh Kupershmidt <schmiddy@gmail.com> writes:
> I made a small half-empty table like this:
>   CREATE TABLE test_vacuum (i  int  PRIMARY KEY);
>   INSERT INTO test_vacuum (i) SELECT a FROM generate_series(1,500000) AS a;
>   DELETE FROM test_vacuum WHERE RANDOM() < 0.5;

> and then ran:
>   VACUUM test_vacuum;

> while an strace of the stats collector process was running. Then after
> a few seconds, found the PID of the VACUUM process, and ran strace on
> it. I killed them after the VACUUM finished. Outputs attached.

Huh.  The VACUUM strace clearly shows a boatload of TABPURGE messages
being sent:

sendto(7, "\2\0\0\0\350\3\0\0\5@\0\0\366\0\0\0\324\206<\24\321uC\24\320\350)\24\225\345,\24"..., 1000, 0, NULL, 0) =
1000
sendto(7, "\2\0\0\0\350\3\0\0\5@\0\0\366\0\0\0C\274?\24\365\323?\24\241N@\24\217\0309\24"..., 1000, 0, NULL, 0) = 1000
sendto(7, "\2\0\0\0\350\3\0\0\5@\0\0\366\0\0\0\375Z2\24\211\f@\0241\3047\24\357mH\24"..., 1000, 0, NULL, 0) = 1000
sendto(7, "\2\0\0\0\350\3\0\0\5@\0\0\366\0\0\0\242\3529\24\234K\'\24\17\227)\24\300\22+\24"..., 1000, 0, NULL, 0) =
1000

and the stats collector is receiving them:

recvfrom(7, "\2\0\0\0\350\3\0\0\5@\0\0\366\0\0\0\324\206<\24\321uC\24\320\350)\24\225\345,\24"..., 1000, 0, NULL, NULL)
=1000 
recvfrom(7, "\2\0\0\0\350\3\0\0\5@\0\0\366\0\0\0C\274?\24\365\323?\24\241N@\24\217\0309\24"..., 1000, 0, NULL, NULL) =
1000
recvfrom(7, "\2\0\0\0\350\3\0\0\5@\0\0\366\0\0\0\375Z2\24\211\f@\0241\3047\24\357mH\24"..., 1000, 0, NULL, NULL) = 1000

So this *should* have resulted in the stats file shrinking.  Did you
happen to notice if it did, after you did this?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Planner not using column limit specified for one column for another column equal to first
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: Re: stats collector suddenly causing lots of IO