delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/13/08:09:03

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.8 required=5.0 tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,SARE_MSGID_LONG45,TW_TD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <p2teb3a2d501004090723ra9d5682bhcb00690c19fb6e4f@mail.gmail.com>
References: <l2keb3a2d501004090706x6c25c3a9l77493ce878884737 AT mail DOT gmail DOT com> <p2teb3a2d501004090723ra9d5682bhcb00690c19fb6e4f AT mail DOT gmail DOT com>
Date: Tue, 13 Apr 2010 14:08:35 +0200
Message-ID: <g2w6910a61004130508m4bf69be8n4e50153f31aa81fc@mail.gmail.com>
Subject: Re: Postgres and CYGWIN environment variable
From: Reini Urban <rurban AT x-ray DOT at>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

2010/4/9 Gary Non-kook (allegedly):
>"cygserver must run as service, CYGWIN must contain server." I vaguely
>remembered seeing something about that environment variable recently,
>and sure enough in
>http://www.cygwin.com/cygwin-ug-net/using-cygwinenv.html#cygwinenv-removed=
-options
>I see "(no)server - ... This option has been removed".
>So... does postgres still require it? I guess not (and will find out
>later when I start "playing").

On cygwin-1.7 the cygserver service does not require CYGWIN=3Dserver anymor=
e.
But it requires the service.
Those release notes are still from a cygwin-1.5, where it needed that.

> /usr/share/doc/Cygwin/postgresql-8.2.11.README also says
> "cygrunsrv is not required anymore, pg_ctl has now the service functions
> included.
> cygserver must run as service"
>
> Then at the end
> "For the impatient: install as user (easy)
> =A0 =A0cygrunsrv -S cygserver
> =A0 =A0initdb -D /usr/share/postgresql/data
> ..."
> So.. is that cygrunsrv required, or not?

There are many ways to start a service.
The cygwin way is
  cygrunsrv -S cygserver.
The windows way is
  net start cygserver

> I ask, because I can't do this
> =A0$ /usr/sbin/initdb -D /usr/share/postgresql/data
> because:
> =A0The files belonging to this database system will be owned by user "jg".
> =A0This user must also own the server process.
>
> =A0The database cluster will be initialized with locales
> =A0 COLLATE: =A0de_CH.ISO-8859-1
> =A0 CTYPE: =A0 =A0de_CH.ISO-8859-1
> =A0 MESSAGES: en_US.ISO-8859-1
> =A0 MONETARY: de_CH.ISO-8859-1
> =A0 NUMERIC: =A0de_CH.ISO-8859-1
> =A0 TIME: =A0 =A0 de_CH.ISO-8859-1
> =A0The default database encoding has accordingly been set to LATIN1.
>
> =A0creating directory /usr/share/postgresql/data ... ok
> =A0creating subdirectories ... ok
> =A0selecting default max_connections ... sh: line 1: =A02204 Bad system
> call =A0 =A0 =A0 =A0 "/usr/sbin/postgres.exe" --boot -x0 -F -c
> max_connections=3D100 -c shared_buffers=3D1000 -c max_fsm_pages=3D20000
> template1 < "/dev/null" > "/dev/null" 2>&1
> =A0sh: line 1: =A03364 Bad system call =A0 =A0 =A0 =A0 "/usr/sbin/postgre=
s.exe"
> --boot -x0 -F -c max_connections=3D50 -c shared_buffers=3D500 -c
> max_fsm_pages=3D20000 template1 < "/dev/null" > "/dev/null" 2>&1
>
> (doing that after the cygrunsrv works just fine.)

Everything looks fine.
Those "3364 Bad system call" errors ok, it is to test your actual
max_connection limit, 100 then 50.
Since cygwin is the slowest of all known postgresql platforms on earth
the max_connection numbers is between 2 and max 64, realistic is 5-15,
but I heard of systems with 62 doing fine.
64 is a Windows limitation.
--=20
Reini Urban
http://phpwiki.org/           http://murbreak.at/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019