Re: AutoVacuum on demand? - Mailing list pgsql-general

From Csaba Nagy
Subject Re: AutoVacuum on demand?
Date
Msg-id 1163496351.2839.77.camel@coppola.muc.ecircle.de
Whole thread Raw
In response to Re: AutoVacuum on demand?  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: AutoVacuum on demand?  ("Matthew T. O'Connor" <matthew@zeut.net>)
List pgsql-general
[snip]
> I think the idea is to edit the postgresql.conf file on the fly and send
> a SIGHUP to the postmaster.  I haven't ever heard of anyone doing that,
> but I don't see any reason why it wouldn't work.

It works, I did it for a while with the statement_timeout to change it
globally over night when admin tasks were running. For the
statement_timeout thing it wasn't optimal however, finally I had to
ditch the thing... but it can be done.

See below my shell script attached, it did work for me, YMMV.

Cheers,
Csaba.


#!/bin/sh

CONF_FILE=/var/lib/postgres/data-8_1_3p/postgresql.conf
PG_CTL=/usr/local/postgres813p/bin/pg_ctl
PG_DIR=/var/lib/postgres/data-8_1_3p

TIMEOUT=0
if [ -n "$1" ]; then
  TIMEOUT=$1
fi

cat $CONF_FILE | sed "s/^\(statement_timeout =
\)[0123456789]\+/\1$TIMEOUT/" > $CONF_FILE.new
mv $CONF_FILE.new $CONF_FILE
$PG_CTL -D $PG_DIR reload




pgsql-general by date:

Previous
From: Desmond Coughlan
Date:
Subject: RE : Re: Trying to Install PhP-4 Module for PostgreSQL from
Next
From: "surabhi.ahuja"
Date:
Subject: empty folder for downlaoding PostgreSQL 8.1.5 for FC 4