Skip site navigation (1) Skip section navigation (2)

Re: Where is the link to cygwin?

From: Reini Urban <rurban(at)x-ray(dot)at>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Marek Lewczuk <newsy(at)lewczuk(dot)com>, pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Where is the link to cygwin?
Date: 2004-10-20 01:07:05
Message-ID: 4175BA39.20908@x-ray.at (view raw or flat)
Thread:
Lists: pgsql-cygwinpgsql-patches
Marek Lewczuk schrieb:
> Reini Urban wrote:
>> Richard Sydney-Smith schrieb:
>> A new initd script will come with 8.0,
>> which just calls pg_ctl and
>> adds service install/uninstall args.
> 
> Reini,
> a few days ago you wrote that you are working on plperl patch for cygwin 
> - how are doing with this ? 

well, bruce said that it should work now.
I got reproducable crashes with IPC.
But I really think that are problems with our cygserver,
not with postgresql. That's why I'm busy with testing our cygserver,
and a few libtool bugs.

> I also found a bug in "pg_ctl register" 
> function - it adds a service, but the path to the pg_ctl file is 
> /usr/local/pgsl/bin/pg_ctl.exe  - which is not available in windows.... 
> or "pg_ctl register" will not work on cygwin ?

Ah, thanks Marek!

$ psservice config PostgreSQL

PsService v1.01 - local and remote services viewer/controller
Copyright (C) 2001 Mark Russinovich
Sysinternals - www.sysinternals.com

SERVICE_NAME: PostgreSQL
(null)
         TYPE              : 10 WIN32_OWN_PROCESS
         START_TYPE        : 2  AUTO_START
         ERROR_CONTROL     : 1  NORMAL
         BINARY_PATH_NAME  : 
/usr/src/postgresql/postgresql-8.0.0cvs/.inst/usr/sbin/./pg_ctl.exe
runservice -N "PostgreSQL" -D "/usr/share/postgresql/data"
         LOAD_ORDER_GROUP  :
         TAG               : 0
         DISPLAY_NAME      : PostgreSQL
         DEPENDENCIES      : RPCSS
         SERVICE_START_NAME: LocalSystem

We need another patch to pg_ctl to convert the exe path.

cd /usr/src/postgresql/postgresql-8.0.0cvs/src/bin/pg_ctl
patch -p0 < cyg-ctlpaths.patch
make
cp ./pg_ctl.exe /usr/src/postgresql/postgresql-8.0.0cvs/.inst/usr/sbin

$ ./pg_ctl.exe unregister

rurban(at)reini /usr/src/postgresql/postgresql-8.0.0cvs/.inst/usr/sbin
$ ./pg_ctl.exe register

rurban(at)reini /usr/src/postgresql/postgresql-8.0.0cvs/.inst/usr/sbin
$ psservice config PostgreSQL

PsService v1.01 - local and remote services viewer/controller
Copyright (C) 2001 Mark Russinovich
Sysinternals - www.sysinternals.com

SERVICE_NAME: PostgreSQL
(null)
         TYPE              : 10 WIN32_OWN_PROCESS
         START_TYPE        : 2  AUTO_START
         ERROR_CONTROL     : 1  NORMAL
         BINARY_PATH_NAME  : 
f:\prog\gnu\cygwin\postgresql\postgresql-8.0.0cvs\.inst\usr\sbin\pg_ctl.
exe runservice -N "PostgreSQL" -D "/usr/share/postgresql/data"
         LOAD_ORDER_GROUP  :
         TAG               : 0
         DISPLAY_NAME      : PostgreSQL
         DEPENDENCIES      : RPCSS
         SERVICE_START_NAME: LocalSystem

-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Attachment: cyg-ctlpaths.patch
Description: text/plain (974 bytes)

In response to

Responses

pgsql-cygwin by date

Next:From: Helmut HänselDate: 2004-10-20 10:23:21
Subject: Re: palloc() under cygwin?
Previous:From: Reini UrbanDate: 2004-10-20 00:32:35
Subject: Re: initdb: failed

pgsql-patches by date

Next:From: Neil ConwayDate: 2004-10-20 02:32:33
Subject: Re: additional GCC warning flags
Previous:From: Gaetano MendolaDate: 2004-10-19 21:17:19
Subject: Re: additional GCC warning flags

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group