[PATCHES] pg_ctl service integration for WIN32

2004-06-16 Thread Claudio Natoli

Here's a rough first cut, close to application state but not a finished
work.

Might be pushed for time over the next week, so if there are major
criticisms it might need someone else to pick this up in the short term.
I'll happily redo any minor bits.

Comments?

Cheers,
Claudio


--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
http://www.memetrics.com/emailpolicy.html";>http://www.memetrics.com/em
ailpolicy.html
  



pg_ctl.patch
Description: Binary data

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [PATCHES] pg_ctl service integration for WIN32

2004-06-16 Thread Dave Page
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Claudio Natoli
> Sent: 16 June 2004 14:49
> To: [EMAIL PROTECTED]
> Subject: [PATCHES] pg_ctl service integration for WIN32
> 
> 
> Here's a rough first cut, close to application state but not 
> a finished work.
> 
> Might be pushed for time over the next week, so if there are 
> major criticisms it might need someone else to pick this up 
> in the short term.
> I'll happily redo any minor bits.
> 
> Comments?

Looks OK to me at a quick glance. One thought though, whilst I like the
idea of using service pause to do a SIGHUP from a convenience point of
view, it's not exactly the expected behaviour and might leave the
inexperienced user wondering why the server is still running normally.
I'm on the fence regarding which way to to go with that though...

Regards, Dave

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [PATCHES] pg_ctl service integration for WIN32

2004-06-16 Thread Bruce Momjian

Wow, my START /B code stays in pg_ctl?  Interesting.  I thought that was
going to be ripped out.

---

Claudio Natoli wrote:
> 
> Here's a rough first cut, close to application state but not a finished
> work.
> 
> Might be pushed for time over the next week, so if there are major
> criticisms it might need someone else to pick this up in the short term.
> I'll happily redo any minor bits.
> 
> Comments?
> 
> Cheers,
> Claudio
> 
> 
> --- 
> Certain disclaimers and policies apply to all email sent from Memetrics.
> For the full text of these disclaimers and policies see 
>  href="http://www.memetrics.com/emailpolicy.html";>http://www.memetrics.com/em
> ailpolicy.html
>   
> 

[ Attachment, skipping... ]

> 
> ---(end of broadcast)---
> TIP 7: don't forget to increase your free space map settings

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [PATCHES] pg_ctl service integration for WIN32

2004-06-16 Thread Claudio Natoli

Bruce Momjian writes:
> Wow, my START /B code stays in pg_ctl?  Interesting.  I 
> thought that was going to be ripped out.

Didn't touch on anything other than service integration.

Cheers,
Claudio

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
http://www.memetrics.com/emailpolicy.html";>http://www.memetrics.com/em
ailpolicy.html

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [PATCHES] pg_ctl service integration for WIN32

2004-06-16 Thread Claudio Natoli

Dave Page writes:
> Looks OK to me at a quick glance. One thought though, whilst I like the
> idea of using service pause to do a SIGHUP from a convenience point of
> view, it's not exactly the expected behaviour and might leave the
> inexperienced user wondering why the server is still running normally.
> I'm on the fence regarding which way to to go with that though...

Likewise, I have no strong feelings either way. Apparently it is an accepted
paradigm.

Subconsciously, I must be against it, as I failed to pass a flag to enable
the Pause/SIGHUP operation. :-)

Amended patch attached.
Claudio

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
http://www.memetrics.com/emailpolicy.html";>http://www.memetrics.com/em
ailpolicy.html
  



pg_ctl.patch
Description: Binary data

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] pg_ctl service integration for WIN32

2004-06-17 Thread Dave Page
 

> -Original Message-
> From: Claudio Natoli [mailto:[EMAIL PROTECTED] 
> Sent: 17 June 2004 02:00
> To: Dave Page; Claudio Natoli; [EMAIL PROTECTED]
> Subject: RE: [PATCHES] pg_ctl service integration for WIN32
> 
> 
> Dave Page writes:
> > Looks OK to me at a quick glance. One thought though, whilst I like 
> > the idea of using service pause to do a SIGHUP from a convenience 
> > point of view, it's not exactly the expected behaviour and 
> might leave 
> > the inexperienced user wondering why the server is still 
> running normally.
> > I'm on the fence regarding which way to to go with that though...
> 
> Likewise, I have no strong feelings either way. Apparently it 
> is an accepted paradigm.

Fair enough - in which case let's keep it and document it someplace.
It'll definitely be handy for those that know about it.

> Subconsciously, I must be against it, as I failed to pass a 
> flag to enable the Pause/SIGHUP operation. :-)

:-)

Regards, Dave.

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [PATCHES] pg_ctl service integration for WIN32

2004-06-20 Thread Magnus Hagander
>
>Amended patch attached.
>Claudio


Hi!

Been testing this, and found a couple of small issues. Attached is a
patch that fixes these. (Note - Claudios patch is included in this one,
since it hasn't been applied yet..)

The issues:
1) When something goes bad, output went to stderr. No way to see that on
win32. Changed to put it to the eventlog when stderr is not a tty. This
also replaces the fprintf(stderr with write_stderr(, the same way my
backend patch does (updated version coming up soon).

2) Append ".exe" to the filename if that is not done automatically. It
wasn't done for me, but since other have had it running, it must work
sometimes... Without this, the service won't stard with an error stating
that there is no valid win32 executable availeble.

3) Prepend ".\" to the account name used to register the service, if no
domain is specified. Required for local domains, and makes it easier for
those not used to having to type .\ for local accounts..


Apart from those, looks good to me.

//Magnus

 


pg_ctl_service.patch
Description: pg_ctl_service.patch

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [PATCHES] pg_ctl service integration for WIN32

2004-06-24 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes:
>> Amended patch attached.
>> Claudio

> Been testing this, and found a couple of small issues. Attached is a
> patch that fixes these. (Note - Claudios patch is included in this one,
> since it hasn't been applied yet..)

Applied, but where's the documentation update?

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster