]> granicus.if.org Git - postgresql/commit
Restructure autovacuum in two processes: a dummy process, which runs
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 15 Feb 2007 23:23:23 +0000 (23:23 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 15 Feb 2007 23:23:23 +0000 (23:23 +0000)
commit182065093420b667a850828c3241ffe940df1aa4
tree14a1fa8acdaf45cdc11e760e961bd4f91b1c20c4
parenteecbb33267642a2f6fcb2a2652f55412b333f4df
Restructure autovacuum in two processes: a dummy process, which runs
continuously, and requests vacuum runs of "autovacuum workers" to postmaster.
The workers do the actual vacuum work.  This allows for future improvements,
like allowing multiple autovacuum jobs running in parallel.

For now, the code keeps the original behavior of having a single autovac
process at any time by sleeping until the previous worker has finished.
16 files changed:
src/backend/access/transam/varsup.c
src/backend/bootstrap/bootstrap.c
src/backend/commands/vacuum.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c
src/backend/storage/ipc/ipci.c
src/backend/storage/lmgr/proc.c
src/backend/tcop/postgres.c
src/backend/utils/init/miscinit.c
src/backend/utils/init/postinit.c
src/include/miscadmin.h
src/include/postmaster/autovacuum.h
src/include/storage/lwlock.h
src/include/storage/pmsignal.h
src/include/storage/proc.h