Setting vacuum_mem for vacuumdb utility

Поиск
Список
Период
Сортировка
Искать

Setting vacuum_mem for vacuumdb utility

От:
Jeff Boes <jboes@qtm.net>
Дата:
I just discovered that the use of a much larger setting on vacuum_mem 
has a joyous effect on the throughput of VACUUM FULL for some of our 
tables. However, all of my maintenance scripts use "vacuumdb" (the 
command-line utility) instead of psql. How can I set vacuum_mem for the 
duration of the vacuumdb command's execution?



-- 
Jeff Boes                                      vox 269.226.9550 ext 24
Database Engineer                                     fax 269.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
            ...Nexcerpt... Extend your Expertise

Re: Setting vacuum_mem for vacuumdb utility

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Jeff Boes wrote:
> I just discovered that the use of a much larger setting on vacuum_mem 
> has a joyous effect on the throughput of VACUUM FULL for some of our 
> tables. However, all of my maintenance scripts use "vacuumdb" (the 
> command-line utility) instead of psql. How can I set vacuum_mem for the 
> duration of the vacuumdb command's execution?

Sure, set it in postgresql.conf.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Setting vacuum_mem for vacuumdb utility

От:
"Chris Hoover" <revoohc@sermonaudio.com>
Дата:
Bruce Momjian wrote:

>Jeff Boes wrote:
>  
>
>>I just discovered that the use of a much larger setting on vacuum_mem 
>>has a joyous effect on the throughput of VACUUM FULL for some of our 
>>tables. However, all of my maintenance scripts use "vacuumdb" (the 
>>command-line utility) instead of psql. How can I set vacuum_mem for the 
>>duration of the vacuumdb command's execution?
>>    
>>
>
>Sure, set it in postgresql.conf.
>
>  
>
You can also modify the vacuumdb script.  I just added a set call to the 
script to set the memory to a high value when vacuuming and reset it 
back to normal when finished so I don't take extra memory away from the 
server.

FAQ