Thread: Setting vacuum_mem for vacuumdb utility
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
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
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.