Here is the code for the auto vacuum daemon I'm working on.
I know some type of auto vacuum is highly desired by the project, I just
don't know if this implementation of auto vacuum is desired as it's not
built into the backend, rather it's a client app.
Attached is tar.gz with all the files, expand it into the src/bin
directory in the source tree and apply the Makefile.diff patch to
src/bin/Makefile and then pg_avd will be built as an executable and
installed in the bin directory along with psql and others.
I have done some benchmarking (I posted some of it to hackers several
weeks back) it always helps with file sizes, but doesn't always help
performance since it might kick off a vacuum in the middle of your
transaction. However it does prevent postgres from performing badly due
to excessive file size and distorted statistics.
Please try it out and give me feedback. Included in the tar is a README
that describes what I have done, and how to use pg_avd.
Matthew