Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release

2005-01-22 Thread Bruce Momjian

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---


Dave Page wrote:
>  
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf 
> > Of Harald Massa
> > Sent: 20 January 2005 13:30
> > To: [EMAIL PROTECTED]
> > Subject: [pgsql-hackers-win32] pg_autovacuum fails to start - 
> > 8.0 Release
> > 
> > I am trying to install pg_autovacuum as a win32 service.
> > 
> > pg_autovacuum -I -N ourdomain\postgres -W secretpassword -E 
> > pgsql-8.0 -d 4
> > -L c:\ghum\data\pg_log\autovacuum.log -U postgres -P 
> > moresecretpasswords
> > 
> > when trying to start:
> > 
> > C:\Programme\PostgreSQL\8.0\bin>sc start pg_autovacuum
> > [SC] StartService FAILED 1075:
> > 
> > Der Abh?ngigkeitsdienst ist nicht vorhanden oder wurde zum 
> > L?schen markiert.
> > 
> > (english: 1075 The dependency service does not exist or has 
> > been marked for
> > deletion.  ERROR_SERVICE_DEPENDENCY_DELETED)
> 
> It appears I didn't read the docs properly when I write that bit - the 
> dependencies parameter passed to CreateService() is supposed to be 
> double-null terminated - a subtle point I missed :-(
> 
> The attached patch fixes this. Harald - I can email an updated .exe if you 
> want to test, otherwise, you should be able to use the current version if you 
> cleanup the 
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pg_autovacuum\DependOnService
>  registry key.
> 
> Regards, Dave

Content-Description: pg_autovacuum.c.diff

[ Attachment, skipping... ]

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

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

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


Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release

2005-01-21 Thread Harald Massa
Dave,

> [access denied]
> 
> I see that message if the service user cannot access the executable - in
> my case, when I tried running it from my development directory, which
> the service user has no access to. When I moved the file to C:\Program
> Files\PostgreSQL\8.0\bin, it worked perfectly.
> 

Hm. I put it there, too. But I copied it from the desktop (where I
downloaded and unzipped it)

And... checking the security-setting, it is exactly what your message
suggests: postgres does not have reading rights.

> It reports the failure in the logfile which becomes the log target. In
> the attached version, I've redirected all install/remove errors to
> stderr (and removed the debug print). 

I think that is a good idea; not that "redirecting to log" would be wrong,
but it bytes. (Same problem with some applications of myself :))

Will try your patched patch,

thanks agaim,

Harald

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


Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release

2005-01-21 Thread Dave Page
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Page
> Sent: 20 January 2005 15:29
> To: Harald Massa; [EMAIL PROTECTED]
> Cc: Patches (PostgreSQL)
> Subject: Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum 
> fails to start - 8.0 Release
> 
> It appears I didn't read the docs properly when I write that 
> bit - the dependencies parameter passed to CreateService() is 
> supposed to be double-null terminated - a subtle point I missed :-(
> 
> The attached patch fixes this. Harald - I can email an 
> updated .exe if you want to test, otherwise, you should be 
> able to use the current version if you cleanup the 
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pg_autova
> cuum\DependOnService registry key.

Sorry - the attached patch supercedes the original. It also directs
errors when installing/removing the windows service to stderr, rather
than other logs.

Regards, Dave.


pg_autovacuum.c.diff
Description: pg_autovacuum.c.diff

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release

2005-01-20 Thread Dave Page
 

> -Original Message-
> From: Harald Massa [mailto:[EMAIL PROTECTED] 
> Sent: 20 January 2005 16:17
> To: Dave Page
> Cc: [EMAIL PROTECTED]; pgsql-patches@postgresql.org
> Subject: RE: [pgsql-hackers-win32] pg_autovacuum fails to 
> start - 8.0 Release
> 
> Dave,
> 
> > You probably need to restart after editting it so that the 
> SCM reloads
> > it. 
> 
> I am not quite sure if that really helped. Either way, I 
> found a workaround
> and want to have it within googling space:
> 
> at the moment the rest of the command-line after -E is stored 
> within the
> DependOnService Property. 
> 
> So the easiest fix is to have -E as the last parameter when 
> creating the
> pg_autovacuum service...
> 
> that creates an 
> DependOnService pgsql-8.0 
> Key-Entry within the registry and it works 

Not every time unfortunately. It very much depends on the state of the
memory and whether or not you end up with an extra null on the end of
the string. In testing I found that often didn't happen.

Regards, Dave

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


Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release

2005-01-20 Thread Harald Massa
Dave,

> You probably need to restart after editting it so that the SCM reloads
> it. 

I am not quite sure if that really helped. Either way, I found a workaround
and want to have it within googling space:

at the moment the rest of the command-line after -E is stored within the
DependOnService Property. 

So the easiest fix is to have -E as the last parameter when creating the
pg_autovacuum service...

that creates an 
DependOnService pgsql-8.0 
Key-Entry within the registry and it works 

Harald


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


Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release

2005-01-20 Thread Dave Page
 

> -Original Message-
> From: Harald Massa [mailto:[EMAIL PROTECTED] 
> Sent: 20 January 2005 16:07
> To: Dave Page
> Cc: [EMAIL PROTECTED]; pgsql-patches@postgresql.org
> Subject: RE: [pgsql-hackers-win32] pg_autovacuum fails to 
> start - 8.0 Release
> 
> Dave,
> 
> thank you very much for fixing the problem.

No problem - sorry I messed up in the first place :-(

>  Just to have it in the
> googleable space:
> 
> > you should be able to use the current version if
> > you cleanup
> the
> 
> >HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pg_autov
> acuum\DependOnService
> >registry key.
> 
> That is of no use. The service fails to start with exactly 
> the same error
> message. (But, at least, I could see the problem within the 
> registry :))

You probably need to restart after editting it so that the SCM reloads
it. 

Regards, Dave

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


Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release

2005-01-20 Thread Harald Massa
Dave,

thank you very much for fixing the problem. Just to have it in the
googleable space:

> you should be able to use the current version if
> you cleanup
the

>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pg_autovacuum\DependOnService
>registry key.

That is of no use. The service fails to start with exactly the same error
message. (But, at least, I could see the problem within the registry :))

Harald

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

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


Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release

2005-01-20 Thread Dave Page
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Harald Massa
> Sent: 20 January 2005 13:30
> To: [EMAIL PROTECTED]
> Subject: [pgsql-hackers-win32] pg_autovacuum fails to start - 
> 8.0 Release
> 
> I am trying to install pg_autovacuum as a win32 service.
> 
> pg_autovacuum -I -N ourdomain\postgres -W secretpassword -E 
> pgsql-8.0 -d 4
> -L c:\ghum\data\pg_log\autovacuum.log -U postgres -P 
> moresecretpasswords
> 
> when trying to start:
> 
> C:\Programme\PostgreSQL\8.0\bin>sc start pg_autovacuum
> [SC] StartService FAILED 1075:
> 
> Der Abhõngigkeitsdienst ist nicht vorhanden oder wurde zum 
> L÷schen markiert.
> 
> (english: 1075 The dependency service does not exist or has 
> been marked for
> deletion.  ERROR_SERVICE_DEPENDENCY_DELETED)

It appears I didn't read the docs properly when I write that bit - the 
dependencies parameter passed to CreateService() is supposed to be double-null 
terminated - a subtle point I missed :-(

The attached patch fixes this. Harald - I can email an updated .exe if you want 
to test, otherwise, you should be able to use the current version if you 
cleanup the 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pg_autovacuum\DependOnService
 registry key.

Regards, Dave


pg_autovacuum.c.diff
Description: pg_autovacuum.c.diff

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