Re: running a SQL command at startup time - Mailing list pgsql-admin

From Kevin Kempter
Subject Re: running a SQL command at startup time
Date
Msg-id 200710170804.09748.kevin@kevinkempterllc.com
Whole thread Raw
In response to running a SQL command at startup time  (Alexis Beuraud <alexis@siatel.com>)
List pgsql-admin
On Wednesday 17 October 2007 03:05:22 Alexis Beuraud wrote:
> Hello all
>
> Is there a way to execute a SQL script whenever the Postgres server starts
> up?
> I would like to run the SQL command "analyze" at startup time. (I might use
> more complicated scripts in the future).
>
> I have not found any related entry in postgresql.conf.
> I have been looking for the keywords init, startup in the FAQ and the
> mailing lists but I have not found the answer.
> Please provide an answer which would work both on Windows and Linux.
> Regards,
> Alexis
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

for a UNIX/Linux box you could tweak the postgresql service script
(i.e. /etc/init.d/postgresql) adding the analyze to the start (and restart if
desired)  processes

/Kevin

--------------------------------------------------------------------------
Your mouse has moved.
Windows must restart to affect the change(s)

Reboot now [Y/y] ?
---------------------------------------------------------------------------



pgsql-admin by date:

Previous
From: Darren Reed
Date:
Subject: Re: Is my database now too big?
Next
From: Jesper Krogh
Date:
Subject: Upgrade time, dump+restore trouble.