From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | jun yang <slickqt(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: how to start a procedure after postgresql started. |
Date: | 2011-05-24 05:42:44 |
Message-ID: | 4DDB4554.4090404@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 24/05/11 12:46, jun yang wrote:
> thanks for the info,i am just not have such deep learn of pg internal,
> i am on user level,not hacker,so the mail is in pgsql-general,not
> hacker list.
Then you really, really, REALLY don't want to start a thread within the
backend, and should avoid spawning processes from backends too. To get
either approach right will require a much deeper understanding of how Pg
works.
>> Part of the reason the postmaster hasn't been altered to support managing
>> daemons is because some people (understandably) think that that's the OS's
>> job, and not something PostgreSQL should duplicate.
>>
> well,from user viewpoint,i prefer that pg bundle with such
> function,like extension in pg,the function default is disable.make it
> easier for those who need it will be a promotion for pg.
> many commercial db production include such a schedule function, not
> only for making money,there is user need in practice.
Yep, I think it'd be nice. Nobody has volunteered to write such a
feature yet, though, and nobody is stepping up to pay someone else to
write it. Or at least any efforts so far haven't reached
production-quality committable code.
The downside of working with an open source database is that there's no
incentive to write marketing-checkbox features. Someone has to actually
want to put in the time and effort to implement it, usually because they
want to use it.
> yes,it is so complicated for a common user to do such things.
... which is why the VAST majority of people achieve what they need
using a separate daemon or just integrate this sort of functionality
into their middleware. Neither option is difficult to do.
What you want to do - integrate your app directly and completely into
the database - is not something that a common user typically wants to do
in the first place.
It's more common for people who want to hide the database behind a
messaging system to instead write a program that accepts messages and
embed a database like Berkeley DB, SQLite or Firebird directly into
their program, rather than the other way around. PostgreSQL cannot be
embedded that way, it's not designed for that kind of use.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2011-05-24 06:00:03 | Re: PostgreSQL and SSIS |
Previous Message | Rick Genter | 2011-05-24 04:50:54 | Re: how to start a procedure after postgresql started. |