X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=T5UGo9gJ2LkPtYnR 6UEh/wcxgFYl2ZfuFmxizo86GXRxniKf4fpZyjpW/JxrpmpOEIyvqVTuj2z6MC9m VNlfZsmUYn+RMTFX2oZ+MMQuHBAPShR1J1H3uyci6VfEZHJkBr99Qgc52W86QyRc qyLAtnjHYKbX1B4vg5kQ/YI1D8g= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=m43yiiWRqaEcKtUS0qUKW8 eFj7s=; b=YQ+38mJJLKSubNBOESkiXB/qochbIujc2Q7j5nhmZv1EGpUbMahd5d +4x6ypfRteo+BVgMaIJVqMxNnjx9KLD5avOL+ohqU0uTxtfd9eDlQ8k/N5hpDNtP aFEbIGllt1sv5CZbeDNlG2ML3kftSTqhvgVT8KDEANYwOzSCZwqrw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=privileges, chloe, Chloe, databases X-HELO: mail-wm0-f50.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=FGLh62wUK9lTM0O+3GvCNGMYxyBdQwniaY46mkbmFuI=; b=TP84tvF4xkUI8C7xVtDVVbxmyAI0FgK8ZZ92B09LXeV01fnyN9n29HlqMuGA8dtva7 JXgEaUBSgKclf9jATTnJgYcrfms/bqqvxzFp/k1FdXGEoaJ2URVl13uSudXNFJLPUF/M ABu8jwofMIr6x2tqN1Xx/W1FG71fUvWjAcfySrF88grCxk0Qs9hhrthqoR3+rQz6/Xp2 4E/jliuSyuT7LJGyocUHtFUxg6WC8rkqrRFKt7SbObUSR/1C4BWqzQ5m3egByVMId4WK okdkDFYABBAvabJSoNEls72SlDAL6BWi819qti4Hz/rhvuPg6c1sGH2tvI2DKzcua0+w sMUA== X-Gm-Message-State: AIkVDXI/Vg3eeKcZK1GbaizMfs9fAWlP/78x4uM7sYdOODH908eodrisHJOjI2mB9Ph33Q== X-Received: by 10.28.69.91 with SMTP id s88mr5906486wma.18.1484223029844; Thu, 12 Jan 2017 04:10:29 -0800 (PST) Subject: Re: postgresql - Cannot initialize new Postgres database on Cygwin - Super User To: cygwin AT cygwin DOT com References: <5876AB5E DOT 50206 AT oliveyou DOT net> From: Marco Atzeri Message-ID: <3afc2540-0a03-e737-9264-1ef26ba6cc9f@gmail.com> Date: Thu, 12 Jan 2017 13:10:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <5876AB5E.50206@oliveyou.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 11/01/2017 23:02, Chloe wrote: > When I try to initialize a new database, I get an error: > > $ /usr/sbin/pg_ctl init > no data was returned by command ""/usr/sbin/initdb.exe" -V" > The program "initdb" is needed by pg_ctl but was not found in the > same directory as "/usr/sbin/pg_ctl". > Check your installation. > > $ /usr/sbin/initdb.exe -V > initdb (PostgreSQL) 9.6.1 > > $ "/usr/sbin/initdb.exe" -V > initdb (PostgreSQL) 9.6.1 > > $ /usr/sbin/initdb.exe -D /usr/share/postgresql > no data was returned by command ""/usr/sbin/postgres.exe" -V" > The program "postgres" is needed by initdb but was not found in the > same directory as "/usr/sbin/initdb". > Check your installation. > > $ /usr/sbin/postgres -V > postgres (PostgreSQL) 9.6.1 > > Cygwin 2.6.1, Postgres 9.6.1 > > > http://superuser.com/questions/1166177/cannot-initialize-new-postgres-database-on-cygwin > Inizialization works for me $ cygrunsrv -S cygserver $ /usr/sbin/initdb -D /usr/local/pgsql/data The files belonging to this database system will be owned by user "marco". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. creating directory /usr/local/pgsql/data ... ok creating subdirectories ... ok selecting default max_connections ... 30 selecting default shared_buffers ... 128MB selecting dynamic shared memory implementation ... sysv creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D /usr/local/pgsql/data -l logfile start $ pg_ctl -D /usr/local/pgsql/data -l logfile start server starting $ psql -l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+-------+----------+-------------+-------------+------------------- postgres | marco | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | marco | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/marco + | | | | | marco=CTc/marco template1 | marco | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/marco + | | | | | marco=CTc/marco (3 rows) can you provide your cygcheck.out ? https://www.cygwin.com/problems.html Regards Marco -- 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