[GENERAL] Bloated Table

2009-05-27 Thread Alexander Schöcke
Hello everybody. I'm using a view (http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html) to display the bloat (unused disk space) of the tables in a PostgreSQL database. Using this data I want to implement a database maintenance script automatically exectuting a VACUUM FULL on these

Re: [GENERAL] Bloated Table

2009-05-27 Thread Grzegorz Jaśkiewicz
On Wed, May 27, 2009 at 3:54 PM, Alexander Schöcke a...@turtle-entertainment.de wrote: Hello everybody. I'm using a view (http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html) to display the bloat (unused disk space) of the tables in a PostgreSQL database. Using this data I want to

Re: [GENERAL] Bloated Table

2009-05-27 Thread Bill Moran
In response to Alexander Schöcke a...@turtle-entertainment.de: Hello everybody. I'm using a view (http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html) to display the bloat (unused disk space) of the tables in a PostgreSQL database. Using this data I want to implement a database

[GENERAL] Bloated Table

2009-05-27 Thread Alexander Schöcke
Hello everybody. I'm using a view (http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html) to display the bloat (unused disk space) of the tables in a PostgreSQL database. Using this data I want to implement a database maintenance script automatically exectuting a VACUUM FULL on these

Re: [GENERAL] Bloated Table

2009-05-27 Thread Tom Lane
=?iso-8859-1?Q?Alexander_Sch=F6cke?= a...@turtle-entertainment.de writes: I'm using a view (http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html) to display the bloat (unused disk space) of the tables in a PostgreSQL database. I wouldn't trust the calculations that view does in the

Re: [GENERAL] Bloated Table

2009-05-27 Thread Alexander Schöcke
What is the output of VACUUM VERBOSE foobar_log? INFO: vacuuming public.foobar_log INFO: index bar_index now contains 23832007 row versions in 118151 pages DETAIL: 0 index row versions were removed. 0 index pages have been deleted, 0 are currently reusable. CPU 0.02s/0.00u sec elapsed 64.10

Re: [GENERAL] Bloated Table

2009-05-27 Thread Brad Nicholson
On Wed, 2009-05-27 at 11:15 -0400, Tom Lane wrote: =?iso-8859-1?Q?Alexander_Sch=F6cke?= a...@turtle-entertainment.de writes: I'm using a view (http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html) to display the bloat (unused disk space) of the tables in a PostgreSQL database. I

Re: [GENERAL] Bloated Table

2009-05-27 Thread Alvaro Herrera
Brad Nicholson wrote: On Wed, 2009-05-27 at 11:15 -0400, Tom Lane wrote: =?iso-8859-1?Q?Alexander_Sch=F6cke?= a...@turtle-entertainment.de writes: I'm using a view (http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html) to display the bloat (unused disk space) of the tables in a

Re: [GENERAL] Bloated Table

2009-05-27 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Brad Nicholson wrote: On Wed, 2009-05-27 at 11:15 -0400, Tom Lane wrote: I wouldn't trust the calculations that view does in the least. If ma is supposed to be maxalign, then this code is broken because it only reports mingw32 as 8, all

Re: [GENERAL] Bloated Table

2009-05-27 Thread Alvaro Herrera
Tom Lane wrote: It's an interesting exercise in trying to estimate bloat without groveling through the whole relation, but I seriously doubt you could ever get numbers this way that are trustworthy enough to drive maintenance decisions. Well, pg_stattuple is way too expensive to be running

Re: [GENERAL] Bloated Table

2009-05-27 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane wrote: It's an interesting exercise in trying to estimate bloat without groveling through the whole relation, but I seriously doubt you could ever get numbers this way that are trustworthy enough to drive maintenance decisions.

Re: [GENERAL] Bloated Table

2009-05-27 Thread Greg Smith
On Wed, 27 May 2009, Tom Lane wrote: It's an interesting exercise in trying to estimate bloat without groveling through the whole relation Interesting and an extremely common request. I just added an item to the Vacuum section of the TODO list while you were listing issues and potential

Re: [GENERAL] Bloated Table

2009-05-27 Thread Christophe
On May 27, 2009, at 3:25 PM, Greg Smith wrote: Interesting and an extremely common request. I just added an item to the Vacuum section of the TODO list while you were listing issues and potential solutions here: Provide more information in order to improve user-side estimates of dead

Re: [GENERAL] Bloated Table

2009-05-27 Thread Tom Lane
Christophe x...@thebuild.com writes: Given this, is there is a recommended way of detecting bloat in indices automatically, rather than just looking at them once in a while and saying, Hm, that looks pretty big? contrib/pgstattuple works; it's just too expensive to run every few minutes