MacPython Logo from __future__ import *

Kailash and Friends Kailash Kher Kaipa

online mp3 Anoice albums buy Amund Maarud albums online Asia online CD Andy M. Stewart buy tracks Axis online Astral Rising A Beautiful Machine download CD Aereda buy tracks Aksent online tracks Absidia Atrium Carceri A Beautiful Machine Absolum buy CD Aryan Wind and Brumalis and Valhalla Saints online music Atomsmasher download albums AK1200 download music Angelzoom online CD Arturo Mantovani and his Orchestra buy music 16 buy tracks Ashtorath online CD Aimee Mann buy music Anael And Bradfield buy mp3 Autumnblaze download mp3 Aggrolites download CD Arj Snoek buy albums Ada buy CD Aalto Andy With Rama West A Beautiful Machine Absolum online tracks Asura albums online Albert Lee 4 Non Blondes A Beautiful Machine Absolum download albums Andrew Lloyd Webber and Ar Rahman online music African Head Charge download mp3 Amber Asylum online music Analena online music ANTIX feat ROB SALMON A.R. Rahman A Beautiful Machine Absolum online tracks African Blackwood buy mp3 Axis buy mp3 Alan Menken buy music Amoebic Dysentery buy Alph Secakuku A Beautiful Machine albums download Albita online Amparo Ochoa A Beautiful Machine download tracks Andy Partridge and Harold Budd download tracks Anubian Lights Alient Project A Beautiful Machine Absolum buy albums Antonio Forcione download CD Ali G Indahouse online mp3 Art and Jazz Messengers Blakey download Arab Strap A Beautiful Machine online albums Adema buy Agua de Annique A Beautiful Machine buy CD Avalanches download tracks Acroma Andi Deris A Beautiful Machine Absolum download tracks American Steel download albums Amanda Perez online 999 A Beautiful Machine download mp3 Arild Andersen download CD American Steel buy tracks Absolute Beginner download tracks Anubi online albums Ancient Wisdom online A Verse Unsung A Beautiful Machine buy music Aghast Andromeda Island A Beautiful Machine Absolum download Arlo Guthrie A Beautiful Machine online mp3 Aavepyora online albums Achillea buy Andrew Bird A Beautiful Machine buy music Alexey Aigui and Ensemble 4'33'' albums buy Abbey Lincoln and Archie Shepp download albums Archive download CD A Guy Called Gerald feat. D.S. download music Al Di Meola online music Abigail download music Angel Witch online music Adelaide

2005-08-17

pg_autovacuum rc for FreeBSD

Filed under: FreeBSD, PostgreSQL — bob @ 9:42 pm

/usr/ports/databases/postgresql-contrib comes with the very useful (until 8.1, anyway) pg_autovacuum daemon, but no rc script. Here's one I whipped up:

/usr/local/etc/rc.d/019.pg_autovacuum.sh

#!/bin/sh
#
# PROVIDE: pg_autovacuum
# REQUIRE: postgresql
# KEYWORD: FreeBSD shutdown

# Add the following line to /etc/rc.conf to enable `pg_autovacuum':
#
# pg_autovacuum_enable="YES"
#
#

. /etc/rc.subr


pg_autovacuum_enable=${pg_autovacuum_enable:-"NO"}
pg_autovacuum_flags=${pg_autovacuum_flags:-"-v 300 -V 0.5"}

name=pg_autovacuum
rcvar=`set_rcvar`
command=/usr/local/bin/pg_autovacuum
load_rc_config ${name}
command_args="-D ${pg_autovacuum_flags}"
pg_autovacuum_user=pgsql

run_rc_command "$1"

I did submit a PR with this by way of send-pr, but it doesn't seem to have ended up in the PR repository. I'm not sure what to do about that, as it's the recommended way to submit PRs!

2 Comments »

  1. The FreeBSD port databases/postgresql80-server already installs a periodic(8) script under ${LOCALBASE}/etc/periodic/daily to do PostgreSQL maintenance, including vacuuming. By which I’m not saying that using pg_autovacuum instead might not be a better idea; I haven’t studied the pros and cons :-)

    send-pr(1) just sends PRs via email, so you should be able to check your MTA’s logs to see whether the mail got delivered to GNATS, at least. Alternatively, you can file a PR online. If there really is a problem with send-pr, well, umm… I was about to say “file a PR”. :-) But in the absence of that, I suppose it can be reported on the freebsd-bugs list.

    – V (FreeBSD ports committer, retired)

    Comment by Johann Visagiie — 2005-08-18 @ 6:30 am

  2. Well, PostgreSQL 8.1 is going to have an improved version of the pg_autovacuum strategy built-in, so it’s not that big of a deal. pg_autovacuum vacuums when the table stats say it’s a good idea, rather than daily (which may be too frequent or infrequent, depending on your usage patterns).

    Good call on the MTA logs, my reverse DNS isn’t proper on that box and @freebsd.org is dissing me. send-pr should probably just use curl to POST the data to the web form, there’s a lot fewer things that could go wrong that way.

    Comment by Bob Ippolito — 2005-08-18 @ 6:51 am

RSS feed for comments on this post.

Leave a comment

WP-Hashcash: protecting you from spam.

Powered by WordPress