pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
running a SQL command at startup time
2+ messages / 2 participants
[nested] [flat]

* running a SQL command at startup time
@ 2007-10-17 09:05  Alexis Beuraud <alexis@siatel.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Alexis Beuraud @ 2007-10-17 09:05 UTC (permalink / raw)
  To: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: running a SQL command at startup time
@ 2007-10-17 14:04  Kevin Kempter <kevin@kevinkempterllc.com>
  parent: Alexis Beuraud <alexis@siatel.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Kevin Kempter @ 2007-10-17 14:04 UTC (permalink / raw)
  To: 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] ?
---------------------------------------------------------------------------





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-10-17 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-10-17 09:05 running a SQL command at startup time Alexis Beuraud <alexis@siatel.com>
2007-10-17 14:04 ` Kevin Kempter <kevin@kevinkempterllc.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox