Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread MichaelDBA
Hi all, In the myriad of articles written about autovacuum tuning, I really like this article by Tomas Vondra of 2ndQuadrant: https://blog.2ndquadrant.com/autovacuum-tuning-basics/ It is a concise article that touches on all the major aspects of autovacuuming tuning: thresholds, scale

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread David Rowley
On Thu, 7 Feb 2019 at 00:17, Laurenz Albe wrote: > > On Wed, 2019-02-06 at 12:29 +0200, Mariel Cherkassky wrote: > > Now the question is how to handle or tune it ? Is there any change that I > > need to increase the cost_limit / cost_delay ? > > Maybe configuring autovacuum to run faster will

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread Mariel Cherkassky
Hey, As I said, I set the next settings for the toasted table : alter table orig_table set (toast.autovacuum_vacuum_scale_factor = 0); alter table orig_table set (toast.autovacuum_vacuum_threshold =1); Can you explain a little bit more why you decided that the autovacuum spent it time

autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread Mariel Cherkassky
Hi, I have a table with a bytea column and its size is huge and thats why postgres created a toasted table for that column. The original table contains about 1K-10K rows but the toasted can contain up to 20M rows. I assigned the next two settings for the toasted table : alter table orig_table

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread dangal
Would it be nice to start changing those values ​​found in the default postgres.conf so low? -- Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread Jeff Janes
On Wed, Feb 6, 2019 at 5:29 AM Mariel Cherkassky < mariel.cherkas...@gmail.com> wrote: > Now the question is how to handle or tune it ? Is there any change that I > need to increase the cost_limit / cost_delay ? > Sometimes vacuum has more work to do, so it takes more time to do it. There is

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread Laurenz Albe
On Wed, 2019-02-06 at 12:29 +0200, Mariel Cherkassky wrote: > Hi, > I have a table with a bytea column and its size is huge and thats why > postgres created a toasted table for that column. > The original table contains about 1K-10K rows but the toasted can contain up > to 20M rows. > I assigned

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread Mariel Cherkassky
which one you mean ? I changed the threshold and the scale for the specific table... ‫בתאריך יום ד׳, 6 בפבר׳ 2019 ב-15:36 מאת ‪dangal‬‏ <‪ danielito.ga...@gmail.com‬‏>:‬ > Would it be nice to start changing those values ​​found in the default > postgres.conf so low? > > > > -- > Sent from: >

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread Mariel Cherkassky
Well, basically I'm trying to tune it because the table still keep growing. I thought that by setting the scale and the threshold it will be enough but its seems that it wasnt. I attached some of the logs output to hear what you guys think about it .. ‫בתאריך יום ד׳, 6 בפבר׳ 2019 ב-16:12 מאת

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread Jeff Janes
On Wed, Feb 6, 2019 at 9:42 AM Mariel Cherkassky < mariel.cherkas...@gmail.com> wrote: > Well, basically I'm trying to tune it because the table still keep > growing. I thought that by setting the scale and the threshold it will be > enough but its seems that it wasnt. I attached some of the logs

Re: autovacuum big table taking hours and sometimes seconds

2019-02-06 Thread David Rowley
On Thu, 7 Feb 2019 at 02:34, Mariel Cherkassky wrote: > As I said, I set the next settings for the toasted table : > > alter table orig_table set (toast.autovacuum_vacuum_scale_factor = 0); > > alter table orig_table set (toast.autovacuum_vacuum_threshold =1); These settings don't

Re: How can sort performance be so different

2019-02-06 Thread Laurenz Albe
Merlin Moncure wrote: > yeah, probably. Having said that, I'm really struggling that it can > take take several minutes to sort such a small number of rows even > with location issues. I can sort rocks faster than that :-). > > Switching between various european collations, I'm seeing subsecond