From: | <mabra(at)manfbraun(dot)de> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Looking for auto starting procedures |
Date: | 2010-12-05 08:31:12 |
Message-ID: | !&!AAAAAAAAAAAYAAAAAAAAAOb5xiPoTM8RjQUAgEiElinCgAAAEAAAACJetM2PI3NLjisBFDoJICYBAAAAAA==@manfbraun.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello !
With server start, I mean the start of the postgresql engine, not the
machine itself.
I thought about a stored procedure to come into a LISTEN in a loop, but the
loop
must be started anyway [avoid a separate daemon {now, I know, I can use a
pgsql script}].
LISTEN looks great to me [not tried yet]. Thanks for the pointers, I have
yet not
heard about PGQ and it looks like something I missed on Sql Server! Will
study
this!
For logging:I think, I have all rights, but not postgresql configured to
log to syslog.
Much thanks!
br++mabra
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Cédric Villemain
Sent: Saturday, December 04, 2010 3:12 PM
To: mabra(at)manfbraun(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Looking for auto starting procedures
2010/12/2 <mabra(at)manfbraun(dot)de>:
> 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.
Perhaps you are trying to solve something with SQL server behavior and
you may find more interesting ways "à la PostgreSQL".
I wonder if you are not looking after something like PgQ[1] or LISTEN/NOTIFY
[2]
>
> 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].
on server start ?! no daemon is necesary.
>
> 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.
Maybe you need to adjust your 'roles' [3] so that log lines can be
identified to your role.
Maybe you'll have better answers if you define your objectives.
[1] http://wiki.postgresql.org/wiki/PGQ_Tutorial
[2] http://www.postgresql.org/docs/current/interactive/sql-notify.html
[3] http://www.postgresql.org/docs/current/interactive/sql-createrole.html
--
Cédric Villemain 2ndQuadrant
http://2ndQuadrant.fr/ PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Rajinder Yadav | 2010-12-05 11:06:13 | pgadmin3 and pgdesigner source |
Previous Message | Tom Lane | 2010-12-05 02:53:12 | Re: pg_restore question |