From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22905 invoked by alias); 12 Jan 2017 12:10:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 22873 invoked by uid 89); 12 Jan 2017 12:10:42 -0000 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 Received: from mail-wm0-f50.google.com (HELO mail-wm0-f50.google.com) (74.125.82.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jan 2017 12:10:32 +0000 Received: by mail-wm0-f50.google.com with SMTP id r144so16835390wme.1 for ; Thu, 12 Jan 2017 04:10:31 -0800 (PST) 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) Received: from ?IPv6:2003:cc:9bc1:b001:104a:3f00:cb38:907e? ([2003:cc:9bc1:b001:104a:3f00:cb38:907e]) by smtp.googlemail.com with ESMTPSA id l187sm2897530wml.6.2017.01.12.04.10.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 04:10:29 -0800 (PST) Subject: Re: postgresql - Cannot initialize new Postgres database on Cygwin - Super User To: cygwin@cygwin.com References: <5876AB5E.50206@oliveyou.net> From: Marco Atzeri Message-ID: <3afc2540-0a03-e737-9264-1ef26ba6cc9f@gmail.com> Date: Thu, 12 Jan 2017 12:10:00 -0000 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 X-SW-Source: 2017-01/txt/msg00113.txt.bz2 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