Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#1926 closed defect (fixed)

Add pg_autovacuum to postgresql port

Reported by: decibel (Jim Nasby) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

Running a postgresql database without vacuuming it is a sure-fire way to completely hose performance; I can't think of any downside to setting pg_autovacuum up to run when postgresql does.

I'll attach a dirt-simple script I use to start pg_autovacuum. Note that autovacuum must start after postgresql; I believe renaming pgsql.sh to 010.pgsql.sh should ensure this.

Attachments (2)

019.pg_autovacuum.sh (402 bytes) - added by decibel (Jim Nasby) 20 years ago.
Script to start pg_autovacuum
019.pg_autovacuum.2.sh (405 bytes) - added by decibel (Jim Nasby) 20 years ago.
Script to start pg_autovacuum

Download all attachments as: .zip

Change History (9)

Changed 20 years ago by decibel (Jim Nasby)

Attachment: 019.pg_autovacuum.sh added

Script to start pg_autovacuum

Changed 20 years ago by decibel (Jim Nasby)

Attachment: 019.pg_autovacuum.2.sh added

Script to start pg_autovacuum

comment:1 Changed 20 years ago by decibel (Jim Nasby)

attachments.isobsolete: 01

comment:2 Changed 20 years ago by decibel (Jim Nasby)

attachments.mimetype: application/octet-streamtext/plain

comment:3 Changed 20 years ago by mww@…

Owner: changed from darwinports-bugs@… to mww@…

assign to maintainer

comment:4 Changed 20 years ago by mww@…

this will need some extra work on the Portfile as 'contrib' doesnt get compiled by default. Adding pg_autovacuum with an extra startup script seems to be of no advantage compared to adding pg_autovacuum to the postgres-startup script itself;

comment:5 Changed 20 years ago by decibel (Jim Nasby)

I agree completely that it makes more sense to put autovacuum in the main startup script. I only did it this way because it was something I already had around from a FreeBSD box.

FWIW, simply doing a cd blah/contrib/pg_autovacuum && gnumake install worked great for me.

By the way, there's also a bug in autovacuum in 7.4.2 that might be worth fixing; http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg45209.html is the end of a thread about it.

comment:6 Changed 20 years ago by mww@…

Status: newassigned

pg_autovacuum is now part of the installed binaries of the postgresql port;

comment:7 Changed 20 years ago by mww@…

Resolution: fixed
Status: assignedclosed

pgsql.sh now starts pg_autovacuum by default (and supplies the options to the postmaster needed to run autovacuum)

Note: See TracTickets for help on using tickets.