Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fjPwz-00077I-2N for pgsql-general@arkaria.postgresql.org; Sat, 28 Jul 2018 14:12:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fjPww-0006AW-Ab for pgsql-general@arkaria.postgresql.org; Sat, 28 Jul 2018 14:12:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fjPwu-0006AO-Ea for pgsql-general@lists.postgresql.org; Sat, 28 Jul 2018 14:12:02 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fjPwo-0000bt-L5 for pgsql-general@postgresql.org; Sat, 28 Jul 2018 14:12:00 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7712921841; Sat, 28 Jul 2018 10:11:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 28 Jul 2018 10:11:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=fy84CkRhTgxtwntBowbMW6oJnOvao DKEHvCfXw5A5fU=; b=zTVWLdy6AN59P3e2hFgWqGzR0+x8iS/fANLr8ng3j9DPv +Fxbv6l8LUWhxWUJHer92cQ5aWzCleBsNvMqMQBU3lwV+NDqAtp0AMxCtSbXmK6w QY6CsUDF3laHE7yyBSaEDzTTEnTtN0Z9by6BJU4dNz5gw1rkulfcFx+Ps4PeGL9W rp9kefugzGrrB+7GUus+1Cpx2H+gvfr4q6TH/oxk2q+UWKjD4YM0A2Ab7PC4ld4P 9tlJ8TU7MVUzHt/m4IbSI5WvRogYOrYWVVzaJhQ+TGPrDi+bl5kd94u+0eobLvOj 81D/fDLaYg8AI9wj60aN9rc6K3xhZwF3DD8C2nFUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=fy84Ck RhTgxtwntBowbMW6oJnOvaoDKEHvCfXw5A5fU=; b=aqbB54slUWqXk9ayM7nANG d4gPV7K+if0ryBSnAC8Ttvatvzk0AdbuXIzg+2x6tji9GhfmmL7HbJG2mKH5SAK/ fQHQrwRmDbSb6F5hF5Xcq00nFCa0ZjYJTo6TlWA5/NsWPK9V/XoLBnmnwJkR+/Rr vwlh8DjjSGBFzbf/huzr4cKcUFdDASji6qjs0d6kxTpXhzFEOwwf3PUvyerJscDD Gp2zJR4YamZuzCtU6/i9OiR7tWYvAbbWIy+xhG/XgB24nnrSvcgueBldnlvkHl8m v9R/evafrS+w39luM5PvUv3GLmTWRbf3MqQErqQWiO/l/zKd6X1UnJUBlV3JjIUg == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 7B25EE405A; Sat, 28 Jul 2018 10:11:51 -0400 (EDT) Subject: Re: postgres with xcode To: Sumit Chaturvedi , pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: <9c60d4da-b090-bba8-86af-4bdd267bd722@aklaver.com> Date: Sat, 28 Jul 2018 07:11:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/28/2018 04:04 AM, Sumit Chaturvedi wrote: > Hello everyone. I'm a third year student from IIT Bombay, India. Since > I'm currently learning about databases, I wanted to debug postgresql > with xcode. However, I am having a lot of problems. > OS - 10.13.6 (High Sierra) > Xcode - 9.4.1 > > To set up my system, I tried to replicate the instructions found at > https://wiki.postgresql.org/wiki/Working_with_Eclipse > for my case. > > Everything proceeded fine until a point where I had to change the run > configuration (scheme in xcode terms). I set the executable as postgre > from /src/backend and gave the appropriate arguments. Then, when I > pressed run, I got an error as shown in the attachment. I can tell you where the error comes from: postmaster.c /* * On macOS, libintl replaces setlocale() with a version that calls * CFLocaleCopyCurrent() when its second argument is "" and every relevant * environment variable is unset or empty. CFLocaleCopyCurrent() makes * the process multithreaded. The postmaster calls sigprocmask() and * calls fork() without an immediate exec(), both of which have undefined * behavior in a multithreaded program. A multithreaded postmaster is the * normal case on Windows, which offers neither fork() nor sigprocmask(). */ if (pthread_is_threaded_np() != 0) ereport(FATAL, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("postmaster became multithreaded during startup"), errhint("Set the LC_ALL environment variable to a valid locale."))); > To solve it, I set up my environment variables in xcode appropriately to > make sure that locale information was reaching wherever it was needed. > But even now, when I press run I get the same error. I do not see that the LC_ALL environment variable is set, per the HINT to the FATAL message. > > Hoping someone can share with me how they went about with their setup. > > -- > Sumit Chaturvedi -- Adrian Klaver adrian.klaver@aklaver.com