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 1fjS4c-0005NC-E4 for pgsql-general@arkaria.postgresql.org; Sat, 28 Jul 2018 16:28:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fjS4Y-0002TA-31 for pgsql-general@arkaria.postgresql.org; Sat, 28 Jul 2018 16:28: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 1fjS4W-0002T2-8C for pgsql-general@lists.postgresql.org; Sat, 28 Jul 2018 16:28:01 +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 1fjS4L-0003To-SU for pgsql-general@postgresql.org; Sat, 28 Jul 2018 16:27:59 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5A29D21841; Sat, 28 Jul 2018 12:27:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 28 Jul 2018 12:27:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc: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=jUSaF0qdseU1l7IxprjUuxsXW58aY UBEgNokotK2QuE=; b=NLeFwndqS9GOE9Ez6RGEtvWW2rZNiEc8dQuhkossIZMaU WsSbL/J9uh044bvJ32tTRXz0+QkxFV1Mgmla1G+L4qJOMf6B9Pur5rv88QzU5eQd dgCpAk1PvZtati7YG9zUxcjGCxvmXaK91eBagWIGwlpHXQGiA/I6bxlLHKV9Bufg FtXBMPoZJKlUvG+8cfsdu+y3eoT6pvyuUFxQBKTW/Z8njQHLP4WHe1nPpKRvDAYA ycdi0KeXq2LXLzLeVfUOlFtEgjveFXf5gQPB13CK+0r8/3YiD4H/G+g2AzoRVsOB upGUyNxS7prOin4srB61Mtvykp6FFbEgAn1Mg02GQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=jUSaF0 qdseU1l7IxprjUuxsXW58aYUBEgNokotK2QuE=; b=nmZnSy19M9VHCXV8mBwLx6 J4t/BMDdWS3P0GKuV7iSTtLK+tupIhi9IvsRRgoT/W838mhqtMxR145GOoDD+oPa 7iMiHmtihlfSI8OADKionAGqhS/NK6QK+paHYvIwYG4c6v3QZFDnqyeD/YOQIfBx kkkrYP0GScppBDuZOD2uUgJ6ZFAkwDzIxjd+q2KpDRJiZU40O/CbUAI+vTGa6DNV dFFmnD/+4yw8RVFcy98Fu1WhpvlV06ERjITqxm/aKOfAZQtpiyQ4FGQpt/l+AxG5 abBnHLZg/r2/aHrzUf0SaxkDdKunV8ztVs7BzH9DHWrNpdw8hU5oht+NIGYj271w == 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 A311BE465F; Sat, 28 Jul 2018 12:27:47 -0400 (EDT) Subject: Re: postgres with xcode To: Sumit Chaturvedi References: <9c60d4da-b090-bba8-86af-4bdd267bd722@aklaver.com> Cc: pgsql-general From: Adrian Klaver Message-ID: Date: Sat, 28 Jul 2018 09:27:46 -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 07:15 AM, Sumit Chaturvedi wrote: Please reply to list also. Ccing list. > Hello. Thanks a lot for your response. Yes that was also there. Note: Bottom posting is the style on this list. Unfortunately the screenshot is not coming through on this reply. For those that see this the screenshot showed: LC_ALL en_US.UTF8 Generally it is a better idea to cut and paste from command line output or a text file then show a screenshot. For the reason above and also because screenshots make it difficult for other users to cut and paste into their machines for testing/debugging purposes. Back to the problem at hand. The error message only shows up in the section I quoted before with regards to locale handling on Macs. Are you having any issues with starting Postgres outside of xcode? > > On Sat, Jul 28, 2018 at 7:41 PM Adrian Klaver > wrote: > > 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 > > -- > Sumit Chaturvedi -- Adrian Klaver adrian.klaver@aklaver.com