Unregister Windows Service pg_ctl error

Started by Gevik Babakhaniover 20 years ago5 messagesgeneral
Jump to latest
#1Gevik Babakhani
pgdev@xs4all.nl

When I try to unregister the windows service I get an error like:

C:\Program Files\PostgreSQL\8.1\bin>pg_ctl.exe unregister -N "pgsql-8.1"
pg_ctl: could not open service manager

This is on Windows XP and the logged user is postgres

#2Magnus Hagander
magnus@hagander.net
In reply to: Gevik Babakhani (#1)
Re: Unregister Windows Service pg_ctl error

When I try to unregister the windows service I get an error like:

C:\Program Files\PostgreSQL\8.1\bin>pg_ctl.exe unregister -N
"pgsql-8.1"
pg_ctl: could not open service manager

This is on Windows XP and the logged user is postgres

You need administrative privileges to unregister a service. Can't run it
as user postgres.

//Magnus

#3Gevik Babakhani
pgdev@xs4all.nl
In reply to: Magnus Hagander (#2)
Re: Unregister Windows Service pg_ctl error

You need administrative privileges to unregister a service. Can't run it
as user postgres.

I did the same under "Administrator" but then I get an access violation
error like:

Unhandled exception at 0x77c478c0 in pg_ctl.exe: 0xC0000005: Access
violation reading location 0x00000000.

What am I dong wrong?

#4Magnus Hagander
magnus@hagander.net
In reply to: Gevik Babakhani (#3)
Re: Unregister Windows Service pg_ctl error

You need administrative privileges to unregister a service.

Can't run

it as user postgres.

I did the same under "Administrator" but then I get an access
violation error like:

Unhandled exception at 0x77c478c0 in pg_ctl.exe: 0xC0000005:
Access violation reading location 0x00000000.

What am I dong wrong?

That's the bug I sent in a patch for just now,that Peter has applied.

The workaround until the next release is out is to specify the data
directory when you do unregister. E.g.
pg_ctl -D ../data unregister

You shouldn't need that, but due to the bug you get a crash if you
don't...

//Magnus

#5Gevik Babakhani
pgdev@xs4all.nl
In reply to: Magnus Hagander (#4)
Re: Unregister Windows Service pg_ctl error

Thank you :)

Show quoted text

-----Original Message-----
From: Magnus Hagander [mailto:mha@sollentuna.net]
Sent: Saturday, January 14, 2006 6:16 PM
To: Gevik
Cc: pgsql-general@postgresql.org
Subject: RE: [GENERAL] Unregister Windows Service pg_ctl error

You need administrative privileges to unregister a service.

Can't run

it as user postgres.

I did the same under "Administrator" but then I get an access
violation error like:

Unhandled exception at 0x77c478c0 in pg_ctl.exe: 0xC0000005:
Access violation reading location 0x00000000.

What am I dong wrong?

That's the bug I sent in a patch for just now,that Peter has applied.

The workaround until the next release is out is to specify the data
directory when you do unregister. E.g.
pg_ctl -D ../data unregister

You shouldn't need that, but due to the bug you get a crash if you
don't...

//Magnus