Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAbQN-00058M-Ne for pgsql-general@arkaria.postgresql.org; Wed, 18 Sep 2019 14:59:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iAbQM-0001Nw-JU for pgsql-general@arkaria.postgresql.org; Wed, 18 Sep 2019 14:59:18 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAbQM-0001Nn-9D for pgsql-general@lists.postgresql.org; Wed, 18 Sep 2019 14:59:18 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAbQJ-00044V-Hm for pgsql-general@lists.postgresql.org; Wed, 18 Sep 2019 14:59:17 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5590921E62; Wed, 18 Sep 2019 10:59:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 18 Sep 2019 10:59:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=M p4o9UjRY9Z04u3/1pQV15Kyc1CrP/B/3julM+MWCfk=; b=oRp/DMaGTc6iSRQPj DQpLKZzfhtL4KbGVLDmY67f2wmqFX1Gu7IBtF4rtyWREequII6Tr6U/fLx1LAj5C /r313gfrSg2g4wj3rZLCh4NxjBWRDm+lWTwnnSKA04zfS21+78dyEe+nVSmjMV3F qdrWvGh+yqZcR/h3I/kmsvxh41+BlUoQt7kEbLgQi8PEv7c1AoaO/uvU+5T0BULE QMD4Jh55tBtAiA8fokS9p6NzqDSLDHbRXxf0HcMvfbTMBw80jNuCX+oTCTynCk2U d7oMM/Sgy5Xq41c6puHWPWeJQ+fiyn8uyA1CYViRBAXWdvyoPTEkSWBbXTm4qjCk XBExw== 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=Mp4o9UjRY9Z04u3/1pQV15Kyc1CrP/B/3julM+MWC fk=; b=w3p5FXRcjDd5hQMnH6+BRVY4t9dZJjgzeUGj2XiIcBHhkWD8eeWYSqWKF YtT62nt1AzrOeD94LJIj+fmJBO+R95LbZ5pO+wt6FZJWsDVPUfNfu5/5auHL5+Ra a1tWM0LBjPqyLqNUmvZ1tGoK7rSIAAigxCl90MKy1wkXTGe1b/Y65IhV35V4BnhX 4bVGaF5gfLeMSRr/iUIWU2GXuvIpQBCqL+K5zMWXu83Wb70Sp4xfCkhNbI5Isp2B iDIzvUUhaWWCS3dqfLlNJHJMr+W70NRzNGx0reBY0c8JhanvxfhEIAi9DmUcy0mR yumOfFQPgB5LfTRZm0sArGIllJ8Yg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudekgdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuffhomhgrihhnpehusghunhhtuhdrtghomhdpphhoshhtghhrvghsqhhlrdhorhhg necukfhppedujeegrddvuddrudehuddrvddufeenucfrrghrrghmpehmrghilhhfrhhomh eprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvghr ufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.3] (174-21-151-213.tukw.qwest.net [174.21.151.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 4843380059; Wed, 18 Sep 2019 10:59:13 -0400 (EDT) Subject: Re: Installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition: No existing local cluster is suitable as a default target To: Matthias Apitz Cc: Marco Ippolito , pgsql-general@lists.postgresql.org References: <20190918131106.GA167414@sh4-5.1blu.de> <793c3697-dc15-973b-575e-e269cf3b0cad@aklaver.com> <20190918144901.GA3103@c720-r342378> From: Adrian Klaver Message-ID: Date: Wed, 18 Sep 2019 07:59:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190918144901.GA3103@c720-r342378> 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 9/18/19 7:49 AM, Matthias Apitz wrote: > El día miércoles, septiembre 18, 2019 a las 07:41:41a. m. -0700, Adrian Klaver escribió: > >> On 9/18/19 6:13 AM, Marco Ippolito wrote: >>> Thanks Matthias, >>> very kind. Hopefully I will get some hints on how to solve my problem. >> >> You should probably take a look at: >> >> https://help.ubuntu.com/lts/serverguide/postgresql.html >> >> FYI, you should set the permission son /usr/lib/postgresql back to root >> and use: >> >> sudo pg_ctl > > NAK. In my understanding, the dir above the data dir of the cluster > should be owned by 'postgres' and the pg_ctl run as 'postgres': > > # mkdir /data/postgresql11 > # chown postgres /data/postgresql11 > # su - postgres > $ LANG=de_DE.UTF-8 export LANG > $ /usr/local/sisis-pap/pgsql/bin/pg_ctl -D /data/postgresql11/data initdb > > This is stolen from the pages mentioned, i.e. https://www.postgresql.org/docs/11/runtime.html > (chapter 18. Server Setup and Operation) and worked out of the box fine > for me. Its a recommendation and not what the Debian/Ubuntu packaging does. From a Ubuntu 16.04.6 LTS install: aklaver@arkansas:~$ ls -al /usr/lib/postgresql/ total 24 drwxr-xr-x 4 root root 4096 May 24 09:57 . drwxr-xr-x 49 root root 12288 Mar 5 2019 .. drwxr-xr-x 4 root root 4096 Mar 17 2018 10 drwxr-xr-x 4 root root 4096 Oct 20 2018 11 aklaver@arkansas:~$ l /var/lib/postgresql/ total 32 drwxr-xr-x 6 postgres postgres 4096 May 29 13:26 ./ drwxr-xr-x 41 root root 4096 May 24 09:47 ../ drwxr-xr-x 3 postgres postgres 4096 Mar 17 2018 10/ drwxr-xr-x 3 postgres postgres 4096 Oct 20 2018 11/ -rw------- 1 postgres postgres 120 May 24 15:07 .bash_history drwx------ 2 postgres postgres 4096 May 24 15:07 .cache/ -rw-rw-r-- 1 postgres postgres 0 May 29 13:27 cat -rw------- 1 postgres postgres 90 Feb 11 2017 .psql_histor From local source install: postgres@tito:~> l /usr/local/pgsql11 total 28 drwxr-xr-x 7 root root 4096 Jan 4 2019 ./ drwxr-xr-x 18 root root 4096 Jul 6 13:54 ../ drwxr-xr-x 2 root root 4096 Aug 26 17:41 bin/ drwx------ 20 postgres postgres 4096 Sep 18 06:27 data/ drwxr-xr-x 6 root root 4096 Aug 26 17:41 include/ drwxr-xr-x 4 root root 4096 Sep 11 07:38 lib64/ drwxr-xr-x 6 root root 4096 Aug 26 17:41 share/ As long as the data directory is owned by postgres all is good. > > matthias > > -- Adrian Klaver adrian.klaver@aklaver.com