Re: Postgresql under cygwin just stopped working.

Поиск
Список
Период
Сортировка
От Mike G
Тема Re: Postgresql under cygwin just stopped working.
Дата
Msg-id 20040729042604.GC30181@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Postgresql under cygwin just stopped working.  ("Martin Husted Hartvig" <mh@ctek.dk>)
Список pgsql-cygwin
Ok,

This might be a long shot but what account are you running the postmaster service under?  Postgres as the docs mention?
Would the postgres account not have permissions to access drive E?  If you log into windows as the postgres user can
youaccess the log folder? 

From what you posted below it looks like you can start the postmaster using pg_ctl possibly because you are not
executingit under the postgres account. 

Mike

On Fri, Jul 23, 2004 at 10:42:06AM +0200, Martin Husted Hartvig wrote:
> I'm still workin on this, and it just won't locate the log file position.
> I have made some dumps:
>
> The PATH didn't have a ref to cygwin, so I added it like you wrote:
>
> PATH
> %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;"C:\Program
> Files\Symantec\Norton Ghost 2003\";E:\cygwin\bin
>
> Here is what cygwin sees:
>
> $ set
> !C:='C:\Documents and Settings\mh\Desktop'
> !E:='E:\cygwin\bin'
> ALLUSERSPROFILE='C:\Documents and Settings\All Users'
> APPDATA='C:\Documents and Settings\mh\Application Data'
> BASH=/usr/bin/bash
> BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release"
> [5]="i686-pc-cygw
> in")
> BASH_VERSION='2.05b.0(1)-release'
> CLIENTNAME=MH2
> COLUMNS=80
> COMMONPROGRAMFILES='C:\Program Files\Common Files'
> COMPUTERNAME=SERVER
> COMSPEC='C:\WINNT\system32\cmd.exe'
> CVS_RSH=/bin/ssh
> CYGWIN=server
> DIRSTACK=()
> EUID=1002
> GROUPS=()
> HISTFILE=/home/mh/.bash_history
> HISTFILESIZE=500
> HISTSIZE=500
> HOME=/home/mh
> HOMEDRIVE=C:
> HOMEPATH='\Documents and Settings\mh'
> HOSTNAME=Server
> HOSTTYPE=i686
> IFS=$' \t\n'
> INFOPATH=/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr
> /autotool/stable/info:
> LINES=25
> LOGONSERVER='\\SERVER'
> MACHTYPE=i686-pc-cygwin
> MAILCHECK=60
> MAKE_MODE=unix
> MANPATH=/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man::/usr/ssl
> /man
> NUMBER_OF_PROCESSORS=1
> OLDPWD=/usr/bin
> OPTERR=1
> OPTIND=1
> OS=Windows_NT
> OS2LIBPATH='C:\WINNT\system32\os2\dll;'
> OSTYPE=cygwin
> PATH='/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINNT/system32:/cy
> gdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:"C:/Program
> Files/Symantec/Norton
>  Ghost 2003/":/usr/bin'
> PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
> PIPESTATUS=([0]="1")
> PPID=1
> PRINTER=
> PROCESSOR_ARCHITECTURE=x86
> PROCESSOR_IDENTIFIER='x86 Family 6 Model 8 Stepping 3, GenuineIntel'
> PROCESSOR_LEVEL=6
> PROCESSOR_REVISION=0803
> PROGRAMFILES='C:\Program Files'
> PROMPT='$P$G'
> PS1=$'\\[\\033]0;\\w\\007\n\\033[32m\\]\\u@\\h
> \\[\\033[33m\\w\\033[0m\\]\n$ '
> PS2='> '
> PS4='+ '
> PWD=/home/mh
> SESSIONNAME=RDP-Tcp#3
> SHELL=/bin/bash
> SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:moni
> tor
> SHLVL=1
> SYSTEMDRIVE=C:
> SYSTEMROOT='C:\WINNT'
> TEMP=/cygdrive/c/DOCUME~1/mh/LOCALS~1/Temp/1
> TERM=cygwin
> TMP=/cygdrive/c/DOCUME~1/mh/LOCALS~1/Temp/1
> UID=1002
> USER=mh
> USERDOMAIN=SERVER
> USERNAME=mh
> USERPROFILE='C:\Documents and Settings\mh'
> WINDIR='C:\WINNT'
> _=/var/postgresql/datahtg
> f=
>
>
>
>
>
> Trying to install as a service gives:
>
> $ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D
> /cygdrive/e/var/postgresql/datahtg -i"
> --dep cygserver --termsig INT --user mh --shutdown
>
>
> $ net start postmaster
>
> The postmaster service is starting.
> The postmaster service could not be started.
>
> A system error has occurred.
>
> System error 1067 has occurred.
>
> The process terminated unexpectedly.
>
>
> DEBUG:  exit(1)
>
>
>
> hmmm.... starting the postmaster comes with this:
>
> $ /usr/bin/postmaster -d 5 -D /var/postgresql/datahtg
> DEBUG:  /usr/bin/postmaster: PostmasterMain: initial environ dump:
> DEBUG:  -----------------------------------------
> DEBUG:          !C:=C:\Documents and Settings\mh\Desktop
> DEBUG:          !E:=E:\cygwin\bin
> DEBUG:          ALLUSERSPROFILE=C:\Documents and Settings\All Users
> DEBUG:          APPDATA=C:\Documents and Settings\mh\Application Data
> DEBUG:          CLIENTNAME=MH2
> DEBUG:          COMMONPROGRAMFILES=C:\Program Files\Common Files
> DEBUG:          COMPUTERNAME=SERVER
> DEBUG:          COMSPEC=C:\WINNT\system32\cmd.exe
> DEBUG:          CVS_RSH=/bin/ssh
> DEBUG:          CYGWIN=server
> DEBUG:          HOME=/home/mh
> DEBUG:          HOMEDRIVE=C:
> DEBUG:          HOMEPATH=\Documents and Settings\mh
> DEBUG:          HOSTNAME=Server
> DEBUG:
> INFOPATH=/usr/local/info:/usr/info:/usr/share/info:/usr/autotool
> /devel/info:/usr/autotool/stable/info:
> DEBUG:          LOGONSERVER=\\SERVER
> DEBUG:          MAKE_MODE=unix
> DEBUG:
> MANPATH=/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/dev
> el/man::/usr/ssl/man
> DEBUG:          NUMBER_OF_PROCESSORS=1
> DEBUG:          OLDPWD=/usr/bin
> DEBUG:          OS2LIBPATH=C:\WINNT\system32\os2\dll;
> DEBUG:          OS=Windows_NT
> DEBUG:
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WIN
> NT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:"C:/Program
> Files/
> Symantec/Norton Ghost 2003/":/usr/bin
> DEBUG:          PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> DEBUG:          PROCESSOR_ARCHITECTURE=x86
> DEBUG:          PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 3,
> GenuineInt
> el
> DEBUG:          PROCESSOR_LEVEL=6
> DEBUG:          PROCESSOR_REVISION=0803
> DEBUG:          PROGRAMFILES=C:\Program Files
> DEBUG:          PROMPT=$P$G
> DEBUG:          PS1=\[\033]0;\w\007
>         \033[32m\]\u@\h \[\033[33m\w\033[0m\]
>         $
> DEBUG:          PWD=/home/mh
> DEBUG:          SESSIONNAME=RDP-Tcp#3
> DEBUG:          SHLVL=1
> DEBUG:          SYSTEMDRIVE=C:
> DEBUG:          SYSTEMROOT=C:\WINNT
> DEBUG:          TEMP=/cygdrive/c/DOCUME~1/mh/LOCALS~1/Temp/1
> DEBUG:          TERM=cygwin
> DEBUG:          TMP=/cygdrive/c/DOCUME~1/mh/LOCALS~1/Temp/1
> DEBUG:          USER=mh
> DEBUG:          USERDOMAIN=SERVER
> DEBUG:          USERNAME=mh
> DEBUG:          USERPROFILE=C:\Documents and Settings\mh
> DEBUG:          WINDIR=C:\WINNT
> DEBUG:          _=/usr/bin/postmaster
> DEBUG:          TZ=RST-1RDT-2,M3.5.0/2,M10.5.0/3
> DEBUG:  -----------------------------------------
> DEBUG:  found "/usr/bin/postgres" using argv[0]
> DEBUG:  invoking IpcMemoryCreate(size=8970240)
> WARNING:  dup(0) failed after 3195 successes: Bad file descriptor
> DEBUG:  max_safe_fds = 985, usable_fds = 3195, already_open = 5
> DEBUG:  found "/usr/bin/postmaster" using argv[0]
> E:\cygwin\bin\postgres.exe (4928): *** MapViewOfFileEx (0xF10000), Win32
> error 4
> 87.  Terminating.
> E:\cygwin\bin\postgres.exe (4924): *** MapViewOfFileEx (0xF10000), Win32
> error 4
> 87.  Terminating.
> DEBUG:  reaping dead processes
> LOG:  statistics collector process (PID 4928) exited with exit code 1
> LOG:  startup process (PID 4924) exited with exit code 1
> LOG:  aborting startup due to startup process failure
> DEBUG:  proc_exit(1)
> DEBUG:  shmem_exit(1)
>
>
> I'm only able to start postgres with the pg_ctl command.
>
> Regards,
> Martin
>
>
>
>
>
> On Mon, 19 Jul 2004 21:55:42 -0500, Mike G <mike@thegodshalls.com> wrote:
>
> >if you run this command from a bash promt what does it output?  env
> >
> >The paths cygwin is using should be listed in the output.  If it is not
> >E then it will need to be changed.  When you updated / reinstalled did
> >you move it from drive C to E?  I don't know if the cygwin installer is
> >smart enough to remove the previous path references.
> >
> >I would guess that your path still has references to the C drive
> >location.  usually new additions to the path are added to the end of the
> >list.  Once cygwin finds a reference to the path it stops looking for
> >others.
> >
> >start->settings->control panel->system->advanced->enviornment
> >variables->bottom section of system variables should have a line name
> >path.  Remove the following if it is still in there 'C:\cygwin\bin;'
> >(must have admin rights).  There should be a 'E:\cygwin\bin;' in there.
> >
> >cygserver doesn't require you to specify a different install location.
> >It will find it via the environment variables set (path).
> >
> >Otherwise you can start postmaster passing the location with the -D
> >option.  In cygwin mapped network drives are prefixed with a /cygdrive.
> >So drive c is really /cygdrive/c.  postmaster -D
> >/cygdrive/e/var/postgresql/data
> >
> >
> >HTH
> >
> >
> >On Mon, Jul 19, 2004 at 10:11:56AM +0200, Martin Husted Hartvig wrote:
> >>
> >>I just installed postgres 7.4.3 on a win2000, here the default max
> >>connections was set to 40, thanks anyway.
> >>
> >>Installing on the win2000 gave me a problem and I found one of your
> >>mail/replies from the 1/7/2004
> >>(http://article.gmane.org/gmane.comp.db.postgresql.cygwin/2502), I have
> >>the precise same error and the only thing I can see that might course it
> >>is that I was forced to install cygwin in e:\cygwin and not in
> >>c:\cygwin.
> >>Is there anywhere I can set the -l parameter to postmaster like with
> >>pq_ctl or is there a other way around this problem?
> >>
> >>Regards,
> >>Martin
> >>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

В списке pgsql-cygwin по дате отправления:

Предыдущее
От: Mike G
Дата:
Сообщение: Re: good use of locale-settings (lang=, lc_...=)
Следующее
От: Saravanan Bellan
Дата:
Сообщение: PostgreSQL 7.2.4 & cygserver