Search Postgresql Archives

Re: Looking for auto starting procedures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx
[mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Cédric Villemain
Sent: Saturday, December 04, 2010 3:12 PM
To: mabra@xxxxxxxxxxxx
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  Looking for auto starting procedures

2010/12/2  <mabra@xxxxxxxxxxxx>:
> 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

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



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux