Thread: running as a service?
What are the current plans regarding running PG as a service? A wrapper, or integrated code? If a wrapper, will it be put in the core, or done as something like a contrib or pgfoundry project? cheers andrew
On Fri, 14 May 2004, Andrew Dunstan wrote: > > What are the current plans regarding running PG as a service? A wrapper, > or integrated code? If a wrapper, will it be put in the core, or done as > something like a contrib or pgfoundry project? IF a wrapper, should be pgfoundry ... *but*, wouldn't integratd by cleaner? would a wrapper be faster/easier? maybe aim for that for 7.5, and full integration for 7.6? ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664
> would a wrapper be faster/easier? maybe aim for that for > 7.5, and full integration for 7.6? No real difference. I posted a skeleton of the required code here: http://archives.postgresql.org/pgsql-patches/2004-05/msg00030.php and was hoping we might get a consensus on the right approach. Cheers, Claudio --- Certain disclaimers and policies apply to all email sent from Memetrics. For the full text of these disclaimers and policies see <a href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em ailpolicy.html</a>
>> What are the current plans regarding running PG as a >service? A wrapper, >> or integrated code? If a wrapper, will it be put in the >core, or done as >> something like a contrib or pgfoundry project? > >IF a wrapper, should be pgfoundry ... *but*, wouldn't integratd by >cleaner? IF it should go to pgfoundry in that case, I'd say it *has* to be integrated :-) *Everybody* on win32 will expect this. No matter if they download source or binaries or MSI installer. If we don't provide it in the main install, people will see that as a major feature lacking that has to be fixed by an external package. As for which - the current code (submitted by Claudio) does an "extra fork/exec" on the postmaster, basically making the postmaster a wrapper for itself (correct me if I remember incorrectly here Claudio - seems the archives.postgresql.org server is down ATM, and I can't find the patch locally). If so, I think it would actualliy be slightly cleaner to have it in a separate binary (that still does all the signal translation we need, of course). But as I think I've said before, I think the two ways are fairly equal overall. But it *has* to go in the main distro. //Magnus
Magnus Hagander wrote: >>>What are the current plans regarding running PG as a >>> >>> >>service? A wrapper, >> >> >>>or integrated code? If a wrapper, will it be put in the >>> >>> >>core, or done as >> >> >>>something like a contrib or pgfoundry project? >>> >>> >>IF a wrapper, should be pgfoundry ... *but*, wouldn't integratd by >>cleaner? >> >> > >IF it should go to pgfoundry in that case, I'd say it *has* to be >integrated :-) > >*Everybody* on win32 will expect this. No matter if they download source >or binaries or MSI installer. If we don't provide it in the main >install, people will see that as a major feature lacking that has to be >fixed by an external package. > I agree. This is necessary to run postgres in any non-development environment. It's the standard Windows way to run a daemon. > >As for which - the current code (submitted by Claudio) does an "extra >fork/exec" on the postmaster, basically making the postmaster a wrapper >for itself (correct me if I remember incorrectly here Claudio - seems >the archives.postgresql.org server is down ATM, and I can't find the >patch locally). If so, I think it would actualliy be slightly cleaner to >have it in a separate binary (that still does all the signal translation >we need, of course). > Presumably a wrapper would have a much smaller memory footprint than an extra copy of postmaster. That seems a good reason to break it out. >But as I think I've said before, I think the two ways are fairly equal >overall. But it *has* to go in the main distro. > > > The reason I asked is that there is a request for a pgfoundry project for a service wrapper, and I wondered if instead we should ask the author to send in a patch for the core. cheers andrew
It's rumoured that Marc G. Fournier once said: > On Fri, 14 May 2004, Andrew Dunstan wrote: > >> >> What are the current plans regarding running PG as a service? A >> wrapper, or integrated code? If a wrapper, will it be put in the core, >> or done as something like a contrib or pgfoundry project? > > IF a wrapper, should be pgfoundry ... *but*, wouldn't integratd by > cleaner? > > would a wrapper be faster/easier? maybe aim for that for 7.5, and full > integration for 7.6? Service code is simple - Claudio already posted a wrapper, and I offered to provide an integrated solution as I did for autovacuum. (what happened to that btw - did it get applied?) Regards Dave.
Dave Page wrote: > It's rumoured that Marc G. Fournier once said: > > On Fri, 14 May 2004, Andrew Dunstan wrote: > > > >> > >> What are the current plans regarding running PG as a service? A > >> wrapper, or integrated code? If a wrapper, will it be put in the core, > >> or done as something like a contrib or pgfoundry project? > > > > IF a wrapper, should be pgfoundry ... *but*, wouldn't integratd by > > cleaner? > > > > would a wrapper be faster/easier? maybe aim for that for 7.5, and full > > integration for 7.6? > > Service code is simple - Claudio already posted a wrapper, and I offered > to provide an integrated solution as I did for autovacuum. (what happened > to that btw - did it get applied?) > Regards Dave. It is hanging waiting to find out of pg_autovacuum will be integrated. If not, it will be applied. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
> As for which - the current code (submitted by Claudio) does an "extra > fork/exec" on the postmaster, basically making the postmaster > a wrapper for itself (correct me if I remember incorrectly here Claudio - seems > the archives.postgresql.org server is down ATM, and I can't find the > patch locally). Yes and no. That's how I have it on my box, but iirc the code I submitted was just the service calls without the postmaster/main.c integration. Should be a no brainer to hook it to a dozen line main.c stand-alone wrapper. > If so, I think it would actualliy be slightly cleaner to > have it in a separate binary (that still does all the signal > translation we need, of course). Agree. > overall. But it *has* to go in the main distro. Agree twice over. Cheers, Claudio --- Certain disclaimers and policies apply to all email sent from Memetrics. For the full text of these disclaimers and policies see <a href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em ailpolicy.html</a>