Обсуждение: pg_ctl porting

Поиск
Список
Период
Сортировка

pg_ctl porting

От
Ronald Kuczek
Дата:
Hi all,

I have skeleton from Claudio and  Keith Woodell.
Idea to start postmaster as new console thread is - IMO all except
productive solution.
Postgres is running as service - quasi-service (the same thing you can
realize with M$ srvany).
My suggestion is - to add to postmaster Win32 service features.
Start,stop,pause, restart, eventlog,service manager etc.
For debugging purposes - developer can start postmaster in console like
any application.
If you want I can continue Claudio's work and complete pg_ctl, my
opinion you know.
Reload can be handled on Pause/ResumeService.
Please tell me your choice, I'll realize it.

Best regards
Rony


Re: pg_ctl porting

От
"Magnus Hagander"
Дата:
>Hi all,
>
>I have skeleton from Claudio and  Keith Woodell.
>Idea to start postmaster as new console thread is - IMO all except
>productive solution.
>Postgres is running as service - quasi-service (the same thing you can
>realize with M$ srvany).
>My suggestion is - to add to postmaster Win32 service features.
>Start,stop,pause, restart, eventlog,service manager etc.
>For debugging purposes - developer can start postmaster in
>console like
>any application.
>If you want I can continue Claudio's work and complete pg_ctl, my
>opinion you know.
>Reload can be handled on Pause/ResumeService.
>Please tell me your choice, I'll realize it.


Hi!

First of all, there is a major difference between Keiths service code
and that of MS srvany: Keiths code supports a clean shutdown! (using our
"homemade signaling code") The MS code just kills the process.

Second, eventlog support is already in cvs.

This said, here are my thoughts:
If it can be integrated directly into the postmaster without there being
too big modifications to the postmaster (added stuff in port/win32 is
fine by me, but if it requires a lot of changes in the main code path,
not as fine), then that is a nicer way to do it. I don't think this
would be a problem, but I haven't looked at it specifically. And as you
said, it still has to be possible to run it on the console - accepting
standard parameters, nothing special required.


Considering we CreateProcess on every backend call, having a separate
binary running as "postmaster service manager" is not that bad if we
need it, though.


And I like the idea about translating Pause into reload. I've seen this
done with many other win32 services, so we're not inventing something
unintuitive there.


//Magnus

Re: pg_ctl porting

От
Claudio Natoli
Дата:

> Idea to start postmaster as new console thread is - IMO all except
> productive solution.

I agree, I'd much rather see the Win32 service functions directly integrated
with the postmaster.

Perhaps it was not clear from the code I sent you, however that is exactly
what I had intended (ie. *not* a rewrite of pg_ctl).


> Reload can be handled on Pause/ResumeService.

That is a nice idea, IMHO.

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>

Re: pg_ctl porting

От
Bruce Momjian
Дата:
Claudio Natoli wrote:
>
>
> > Idea to start postmaster as new console thread is - IMO all except
> > productive solution.
>
> I agree, I'd much rather see the Win32 service functions directly integrated
> with the postmaster.
>
> Perhaps it was not clear from the code I sent you, however that is exactly
> what I had intended (ie. *not* a rewrite of pg_ctl).

FYI, we will rewrite pg_ctl in C anyway in case someone wants to control
PostgreSQL from a script.

--
  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

Re: pg_ctl porting

От
Ronald Kuczek
Дата:
Bruce Momjian wrote:

>FYI, we will rewrite pg_ctl in C anyway in case someone wants to control
>PostgreSQL from a script.
>
>
I see your point. I'll realize "Hook into Win32 Service API" item.

Best regards
Rony



pgsvc license // please advise

От
"Keith Woodell"
Дата:
Hello all,

SourceForge is being really picky about the license, for some reason. So
here is the version for PGSVC. It's basically the PG license, with the title
changed.

Is there any advice, or objections?

Thanks,

-K

=================================

PostgreSQL Windows Service Manager
(also known as PGSVC or PGSVCWIN32)

Portions Copyright (c) 2004, Keith W. (http://www.efesar.com/pgsvc)

Portions Copyright (c) 1996-2004, The PostgreSQL Global Development Group

Portions Copyright (c) 1994, The Regents of the University of California

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
"AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

People often ask why PostgreSQL is not released under the GNU General Public
Licence. The simple answer is because we like the BSD licence and do not
want to change it. If you are keen to read more about this topic, then
please take a look in the Archives at any of the many threads on this
subject, but please don't start yet another debate on the subject!