Re: slow commits with heavy temp table usage in 8.4.0
От | Tom Lane |
---|---|
Тема | Re: slow commits with heavy temp table usage in 8.4.0 |
Дата | |
Msg-id | 28632.1249502537@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | slow commits with heavy temp table usage in 8.4.0 ("Todd A. Cook" <tcook@blackducksoftware.com>) |
Ответы |
Re: slow commits with heavy temp table usage in
8.4.0
|
Список | pgsql-hackers |
"Todd A. Cook" <tcook@blackducksoftware.com> writes: > I've noticed that on 8.4.0, commits can take a long time when a temp table is repeatedly > filled and truncated within a loop. A very contrived example is Hmm. I tweaked the function to allow varying the number of truncates: regression=# begin; BEGIN Time: 1.037 ms regression=# select commit_test_with_truncations(10000) ;commit_test_with_truncations ------------------------------ (1 row) Time: 9466.060 ms regression=# commit; COMMIT Time: 1095.946 ms regression=# begin; BEGIN Time: 1.002 ms regression=# select commit_test_with_truncations(30000) ;commit_test_with_truncations ------------------------------ (1 row) Time: 93492.874 ms regression=# commit; COMMIT Time: 3184.248 ms The commit time doesn't seem tremendously out of line, but it looks like there's something O(N^2)-ish in the function execution. Do you see a similar pattern? With so many temp files there could well be some blame on the kernel side. (This is a Fedora 10 box.) regards, tom lane
В списке pgsql-hackers по дате отправления: