Re: Looking for auto starting procedures - Mailing list pgsql-general

From
Subject Re: Looking for auto starting procedures
Date
Msg-id !&!AAAAAAAAAAAYAAAAAAAAAOb5xiPoTM8RjQUAgEiElinCgAAAEAAAAB3rS02/93BIgmeTNxF1pRcBAAAAAA==@manfbraun.de
Whole thread Raw
In response to Re: Looking for auto starting procedures  (Robert Gravsjö <robert@blogg.se>)
Responses Re: Looking for auto starting procedures  (Scott Ribe <scott_ribe@elevated-dev.com>)
Re: Looking for auto starting procedures  (Cédric Villemain <cedric.villemain.debian@gmail.com>)
List pgsql-general
Hello !

And thanks to all, for answers.

Naturally, cron does not operate on DB tables and if I add/remove/change
a line in a control table dynamically, cron would not notice that ;-)
So I had to write a daemon, which acts on that table. This might happen
about ~5 - 20 seconds and cron is operates on minutes only.

An auto running stored procedure would solve the problem, if therewould be
a way to run this procedure on server startup automatically
[as it looks, write another daemon for this].

The usual notification from postgreSQL does not allow to write
an [own, better to evaluate] identifier in the syslog. This is
not a matter of the syslog daemon, its on the program which logs.
May be, I have just not found this.

Wished, my migration would a bit easier ;-)

br++mabra


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Robert Gravsjö
Sent: Thursday, December 02, 2010 1:24 PM
To: mabra@manfbraun.de
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Looking for auto starting procedures



On 2010-12-01 16.16, mabra@manfbraun.de wrote:
> Hello !
>
> I am coming from Sql Server right now and have to learn about the
> infrastructure.
>
> What I missed first, is, to execute procedures regularly/repeatedly
> on a given time. I want to prevent my to write a lot external
> programs und use cron :-(

cron is the standard way of scheduling reoccurring jobs on *nix systems.
It's preferable to having each daemon implement scheduling on its own.

>
> The othing thing is, that I need some internally running procedures, which
> do some work. On Sql Server, I can use "auto-start stored procedures".
> Is there anything like this in postgresql, or what can I do?

Is this long running processes, i.e daemons, or is it scheduled processes?

For long running I would recommend writing a proper daemon.
For scheduled I'd recommend cron or at.

>
> And, is it just possible, to put a message to the syslog and with
> my own identification string?

I'm pretty sure you can accomplish this in configuration if you're using
syslog-ng. Other syslog alternatives probably has similar possibilities.

--
Regards,
Robert "roppert" Gravsjö

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: How to find correct locale name for CREATEDATABASE
Next
From: "Andrus"
Date:
Subject: Re: How to find correct locale name for CREATEDATABASE