Обсуждение: Misc. Win32 questions

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

Misc. Win32 questions

От
Ian Barwick
Дата:
Hi

can someone confirm the following obvervations / questions
regarding PostgreSQL on Windows (I'm writing an article and don't want
to give wrong information):

- the directory with the various bin utilities (initdb etc.)  isn't
appended to the system path during installation;

- a reboot during / after installation is not necessary;

- there's no tab-expansion support in psql. Is that a licensing
issue or a Windows issue?

- is the only way to start initdb and co. from the Windows
command-prompt thingy?

- how can I reload the server after changing a config file (without forcibly
stopping / starting the server)?

- (embarassing question) how do I execute a command on the Windows
command line thingy where the path has a space in it (C:\Program
Files\...)?

Thanks

Ian Barwick

Re: Misc. Win32 questions

От
"Magnus Hagander"
Дата:
>Hi
>
>can someone confirm the following obvervations / questions
>regarding PostgreSQL on Windows (I'm writing an article and don't want
>to give wrong information):
>
>- the directory with the various bin utilities (initdb etc.)  isn't
>appended to the system path during installation;

Correct. However, we are planning to add it as an *option* for those who
want it. It will never be necessary.


>- a reboot during / after installation is not necessary;

Normally, correct. A reboot may be required when upgrading from an
earlier version if that one is not stopped by default. But in all normal
cases, reboot is not requried.


>- there's no tab-expansion support in psql. Is that a licensing
>issue or a Windows issue?

Definitly not a licensing issue.


>- is the only way to start initdb and co. from the Windows
>command-prompt thingy?

Correct. Apart fromt he installer that automatically calls initdb, of
course.


>- how can I reload the server after changing a config file
>(without forcibly
>stopping / starting the server)?

You can either use "pg_ctl kill", or you can send a "pause" command to
the service.


>- (embarassing question) how do I execute a command on the Windows
>command line thingy where the path has a space in it (C:\Program
>Files\...)?

Put quotes around it.
"C:\Program Files\PostgreSQL\8.0.0-rc1\bin\psql" template1


//Magnus

Re: Misc. Win32 questions

От
"Andrew Dunstan"
Дата:
Magnus Hagander said:
>
>>- there's no tab-expansion support in psql. Is that a licensing
>>issue or a Windows issue?
>
> Definitly not a licensing issue.
>

IIRC, it is because of unresolved issues with use of the readline library on
Windows, especially when using non-US code pages.

cheers

andrew





Re: Misc. Win32 questions

От
Ian Barwick
Дата:
On Sun, 12 Dec 2004 18:53:00 +0100, Magnus Hagander > >- how can I
reload the server after changing a config file
> >(without forcibly
> >stopping / starting the server)?
>
> You can either use "pg_ctl kill", or you can send a "pause" command to
> the service.

"pause"? Well, I suppose it's more humane than kill ;-).
I get an error about the server not returning an error which
might be an internal Windows error or an internal service
error, but it seems to work.

> >- (embarassing question) how do I execute a command on the Windows
> >command line thingy where the path has a space in it (C:\Program
> >Files\...)?
>
> Put quotes around it.
> "C:\Program Files\PostgreSQL\8.0.0-rc1\bin\psql" template1

Ah, that was the trick.

Thanks

Ian Barwick

Re: Misc. Win32 questions

От
"Magnus Hagander"
Дата:
>> >(without forcibly
>> >stopping / starting the server)?
>>
>> You can either use "pg_ctl kill", or you can send a "pause"
>command to
>> the service.
>
>"pause"? Well, I suppose it's more humane than kill ;-).
>I get an error about the server not returning an error which
>might be an internal Windows error or an internal service
>error, but it seems to work.

Yeah, that's normal.

//Magnus

Re: Misc. Win32 questions

От
Ian Barwick
Дата:
On Sun, 12 Dec 2004 19:55:10 +0100, Magnus Hagander <mha@sollentuna.net> wrote:
>
>
> >> >(without forcibly
> >> >stopping / starting the server)?
> >>
> >> You can either use "pg_ctl kill", or you can send a "pause"
> >command to
> >> the service.
> >
> >"pause"? Well, I suppose it's more humane than kill ;-).
> >I get an error about the server not returning an error which
> >might be an internal Windows error or an internal service
> >error, but it seems to work.
>
> Yeah, that's normal.

I like the "command line" version as well:

C:\Program Files\PostgreSQL\8.0.0-rc1\bin>net pause pgsql-8.0.0-rc1
The PostgreSQL Database Server 8.0.0-rc1 service failed to pause.
More help is available by typing NET HELPMSG 3539.
C:\Program Files\PostgreSQL\8.0.0-rc1\bin>net helpmsg 3539
The *** service failed to pause.

(trying to think what three-letter word is meant here... ;-)

Seriously, would this not be a good FAQ item too?

Thanks for all the feedback.

Ian Barwick

Re: Misc. Win32 questions

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgsql-hackers-win32-owner@postgresql.org
> [mailto:pgsql-hackers-win32-owner@postgresql.org] On Behalf
> Of Ian Barwick
> Sent: 12 December 2004 20:50
> To: Magnus Hagander
> Cc: pgsql-hackers-win32@postgresql.org
> Subject: Re: [pgsql-hackers-win32] Misc. Win32 questions
>
> I like the "command line" version as well:
>
> C:\Program Files\PostgreSQL\8.0.0-rc1\bin>net pause
> pgsql-8.0.0-rc1 The PostgreSQL Database Server 8.0.0-rc1
> service failed to pause.
> More help is available by typing NET HELPMSG 3539.
> C:\Program Files\PostgreSQL\8.0.0-rc1\bin>net helpmsg 3539
> The *** service failed to pause.
>
> (trying to think what three-letter word is meant here... ;-)
>
> Seriously, would this not be a good FAQ item too?

Probably. There's actually nothing we can do about it other than really
pause the service, which you probably don't want!

Oh, and I suspect Magnus actually meant 'pg_ctl reload' not 'pg_ctl
kill' :-)

Regards, Dave.

PS. I've added both this and the Unicode issue to the FAQ.

Re: Misc. Win32 questions

От
"Magnus Hagander"
Дата:
>> I like the "command line" version as well:
>>
>> C:\Program Files\PostgreSQL\8.0.0-rc1\bin>net pause
>> pgsql-8.0.0-rc1 The PostgreSQL Database Server 8.0.0-rc1
>> service failed to pause.
>> More help is available by typing NET HELPMSG 3539.
>> C:\Program Files\PostgreSQL\8.0.0-rc1\bin>net helpmsg 3539
>> The *** service failed to pause.
>>
>> (trying to think what three-letter word is meant here... ;-)
>>
>> Seriously, would this not be a good FAQ item too?
>
>Probably. There's actually nothing we can do about it other than really
>pause the service, which you probably don't want!
>
>Oh, and I suspect Magnus actually meant 'pg_ctl reload' not 'pg_ctl
>kill' :-)

I meant 'pg_ctl kill'. Though pg_ctl reload will of course work equally
well, and doesn't require you to figure out the postmaster PID manually,
so it's the neater way :-)

//Magnus

Re: Misc. Win32 questions

От
"Andrew Dunstan"
Дата:
Dave Page said:
> There's actually nothing we can do about it other than really
> pause the service, which you probably don't want!
>

It's a pity that the service manager is so starved of available operations
that all we could do was to co-opt the pause operation for reload. I suspect
lots of Windows admins will be surprised by that. Certainly I don't think we
should tell people to use the command line version - pg_ctl reload is a much
nicer way to go.

cheers

andrew



Re: Misc. Win32 questions

От
Ian Barwick
Дата:
On Sun, 12 Dec 2004 16:22:02 -0600 (CST), Andrew Dunstan
<andrew@dunslane.net> wrote:
> Dave Page said:
> > There's actually nothing we can do about it other than really
> > pause the service, which you probably don't want!
> >
>
> It's a pity that the service manager is so starved of available operations
> that all we could do was to co-opt the pause operation for reload. I suspect
> lots of Windows admins will be surprised by that.

A lot of non-Windows admins too ;-). (Last time I had any real idea of
Windows in an administrative sense it came on floppy disks...)

Would it be an idea to add a reload shortcut alongside the
start / stop shortcuts which are installed in the Windows start menu?
It might make life easier when explaining to end
users how to ensure changes in the config files can be
applied.

Ian Barwick

Re: Misc. Win32 questions

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Ian Barwick [mailto:barwick@gmail.com]
> Sent: 12 December 2004 22:31
> To: Andrew Dunstan
> Cc: Dave Page; mha@sollentuna.net; pgsql-hackers-win32@postgresql.org
> Subject: Re: [pgsql-hackers-win32] Misc. Win32 questions
>
>
> Would it be an idea to add a reload shortcut alongside the
> start / stop shortcuts which are installed in the Windows start menu?
> It might make life easier when explaining to end users how to
> ensure changes in the config files can be applied.

Err, yeah - good idea. Change committed to CVS, FAQ removed :-)

Regards, Dave.