![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Attached you'll find the archive with data you've asked. |
#2
| |||
| |||
|
|
Autovacuum is off. The VACUUM FULL bottom line is: INFO: free space map contains 59842 pages in 25371 relations DETAIL: A total of 426720 page slots are in use (including overhead). 426720 page slots are required to track all free space. And the quick iterations for all the DBs with psql -t -c "\dt" shows 67654 rows. So there's not 81952, BUT, the tables are created (and dropped) quite often during the work hours (and they're regular, not TEMPORARY tables). I also find out, that there were 11170 tables created (and most of them dropped) today. |
#3
| |||
| |||
|
|
Marcin <migor (AT) op (DOT) pl> writes: So there's not 81952, BUT, the tables are created (and dropped) quite often during the work hours (and they're regular, not TEMPORARY tables). I also find out, that there were 11170 tables created (and most of them dropped) today. Looking at the code, stats entries for dropped tables are cleaned out only when a VACUUM command is done; which is something we probably ought to change. |
#4
| |||
| |||
|
|
Tom Lane wrote: Looking at the code, stats entries for dropped tables are cleaned out only when a VACUUM command is done; which is something we probably ought to change. I was going to ask if you were confusing pgstat_vacuum_tabstat with a VACUUM command, when I noticed that only in vacuum() is that function called! This surprised me and I agree that it should be changed. I'm not sure what would be a more appropiate place to call it, however. |
#5
| |||
| |||
|
|
However, that's always been the case, so I don't understand why your stats file is so much bigger in 8.1. Have you changed your vacuuming strategy at all since the 8.0 installation? Perhaps row or block statistics weren't enabled in the 8.0 installation and are now? |
#6
| |||
| |||
|
|
On Tue, Jan 17, 2006 at 05:12:09PM -0500, Tom Lane wrote: However, that's always been the case, so I don't understand why your stats file is so much bigger in 8.1. Have you changed your vacuuming strategy at all since the 8.0 installation? Perhaps row or block statistics weren't enabled in the 8.0 installation and are now? The only change was the upgrade to 8.1. I run VACUUM FULL everyday, and double checked that it finished succesfully in last two days. The block and row statistics are disabled: stats_start_collector = on stats_command_string = off stats_block_level = off stats_row_level = off stats_reset_on_server_start = off |
#7
| |||
| |||
|
|
Stats off and it's still bloating the file?? [ studies code... ] I see the culprit: it's the pgstat_report_vacuum and pgstat_report_analyze routines that were added in 8.1. Those send messages unconditionally, meaning that the collector will create table entries for every table during a database-wide vacuum, even with stats turned off. This seems like a bad idea. |
|
Given the nature of what's counted, I think that treating these messages as "row level" stats would be appropriate. Alvaro, what do you think? |
#8
| |||
| |||
|
|
Yeah, row level seems appropiate for what we use it. I'll take care of it, unless you want to do it. |
#9
| |||
| |||
|
|
Tom Lane wrote: Given the nature of what's counted, I think that treating these messages as "row level" stats would be appropriate. Alvaro, what do you think? Yeah, row level seems appropiate for what we use it. I'll take care of it, unless you want to do it. |
#10
| |||
| |||
|
|
Actually, there's another problem here: if we do have row-level stats turned on, a manual "VACUUM" command will still cause the set of tables listed in the stats file to grow to include every table in the DB, whether or not anything interesting is happening to that table. I think this is probably undesirable. I'm tempted to change pgstat_recv_vacuum and pgstat_recv_analyze so that they will not create new hash entries, but only insert the row count if the hash entry already exists. I am a bit worried that I might be missing something about possible interactions with autovacuum though. I see that autovac skips vacuuming tables that have no hash entry ... is there some circular reasoning going on there? |
![]() |
| Thread Tools | |
| Display Modes | |
| |