From: | jun yang <slickqt(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Fwd: how to start a procedure after postgresql started. |
Date: | 2011-05-23 02:14:04 |
Message-ID: | BANLkTimHwezcCMN_rjtsC2ShZgp1t76pVQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
---------- Forwarded message ----------
From: jun yang <slickqt(at)gmail(dot)com>
Date: 2011/5/23
Subject: Re: [GENERAL] how to start a procedure after postgresql started.
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
2011/5/23 Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>:
> On 23/05/2011 9:37 AM, jun yang wrote:
>
>> what we want to do is explore the ability to move the system to the
>> architecture like below:
>> some pg---message broker(qpid)---(web front and some collect data
>> terminal,some business logic server,some system status monitor)
>> when pg start it subscribe to qpid then process the message send to it.
>> when pg is down,the important message is saved in message broker.
>
> It's probably going to be a *lot* easier and more reliable to have something
> sitting between Pg and the message broker. It can monitor Pg, and
> unsubscribe from the broker when Pg is unavailable, then re-subscribe when
> Pg becomes available again.
>
yes,you are right,so it will be nice if pg can start the one between
pg and broker.
> Putting it inside the PostgreSQL process space won't be especially easy,
> because PostgreSQL doesn't support true stored procedures and doesn't have
> any kind of built-in scheduler/event handler that can invoke them without
> application involvement. Because of that, you'd probably have to make
> significant changes to Pg's innards to make it work how you want.
>
actually, we will write the procedure in pl/python,then fork a new
thread or a new process which is easy.
> There's been discussion of adding the ability for the postmaster to start
> helper daemons, and if that were merged you could use a helper started
> alongside the postmaster to do the work. Right now, though, you're better
> off doing things how PgAgent etc do it, that is out-of-process via a regular
> Pg connection.
>
then the one sitting between pg and borker is a helper daemon,it is
great,more info about that?
PgAgent is nice,i am just wondering why it can't be integrated in
standard pg install,cause security? functionality?
if helper daemon integrated in pg,the PgAgent can be a helper daemon too.
i'd like helper daemon can operate like windows service,you can
disable it,make it mannual start, or auto start with pg.
> --
> Craig Ringer
>
> Tech-related writing at http://soapyfrogs.blogspot.com/
>
From | Date | Subject | |
---|---|---|---|
Next Message | Darren Duncan | 2011-05-23 02:24:35 | Re: how to start a procedure after postgresql started. |
Previous Message | Craig Ringer | 2011-05-23 01:48:21 | Re: how to start a procedure after postgresql started. |