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 1fyJAb-00041b-Ea for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Sep 2018 15:59:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyJAZ-0003fv-QK for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Sep 2018 15:59:39 +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 1fyJAZ-0003fn-H7 for pgsql-hackers@lists.postgresql.org; Fri, 07 Sep 2018 15:59:39 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fyJAW-0006ee-ST for pgsql-hackers@postgresql.org; Fri, 07 Sep 2018 15:59:39 +0000 Received: by mail-lf1-x144.google.com with SMTP id e23-v6so12407746lfc.13 for ; Fri, 07 Sep 2018 08:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=YLF7EEoetsct5yL4a9tcn/TlIv8C4RVnQcBOiQ2lIV0=; b=tpTQPQ2dWm0V7R+kt3qGxlTYlZH3tcEoJNTv/NCidDaLC+UpTwlr3h407b2YivPlOp xQZ/ztaHP5CVeaTw/nKXO3ktiMxP32NpLK9pEMD3tql1yoAVkDVjEBUSYelknC3lilxS 3PwmoYVpKBgd9dNew4ya24IQr8AwpJU2IbUwpgaUaLDU3SCics+Z1/q3LRIGG1HhP3uX OQj4KJmbpcDZbRaJBqjEM+V+uwokk1Xf4imOVR80kksuCeun/a0K+kljhrfX8jffxaMk by8fbJjpnB/wtJqXYv3ffNg+lkRLyrI79dW12BRP68Y6ABtsogluS6rQ00mbwa0OvBqy BzRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=YLF7EEoetsct5yL4a9tcn/TlIv8C4RVnQcBOiQ2lIV0=; b=uJpisH3K6+3N8sX9BoJgo9wrjuHOEY16LbUBESaLU6MIcvs8z6Kj4+pv3PAR3OsK++ 2m2itGHqhu2D9gqNlRXsQmWK8rPNt7MG0eoZTpxy31JNML3c5ftFLQR9vLHuP95/gyUq rhu7+ETx/O50GygyW45zOPTyyzrdBu1qDJqyG9zoIV77rf2i3dDXV49unHZgD/rli9Tc 3M+NWaK7W1ckQWgl4ZETDUB/fXmTVc/lEejbc9VUR6SNAeU1fhETGg2TdDdYDBiiJBax UpbQ/cTqhXicrRTO+gdf/jXW5isDpsGlWBDia322rL08lKCLLR7J7FQcj/Z6l5BeYlGH hh7A== X-Gm-Message-State: APzg51DqG0SQ03WAin2wVcJvL5H4Q/0EiRsxMhTGAofDIpTQOZIh7tPb Z11Pt0RYlAstrLSUnW+uRuMSWf4f1Gk= X-Google-Smtp-Source: ANB0VdanlTJx9lh1LIloUVZnoQ2I6e42mf4jqUcuPvOBMBdf7WEzwb7otxfoUDVMgewxaQHZlxD6Gw== X-Received: by 2002:ac2:50c7:: with SMTP id h7-v6mr5353123lfm.47.1536335975735; Fri, 07 Sep 2018 08:59:35 -0700 (PDT) Received: from [192.168.27.213] ([93.174.131.141]) by smtp.gmail.com with ESMTPSA id 36-v6sm1383288lja.65.2018.09.07.08.59.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 08:59:35 -0700 (PDT) Subject: Re: Hint to set owner for tablespace directory To: Peter Eisentraut , Tom Lane Cc: PostgreSQL-development References: <5ca60e1a-26f9-89fd-e912-021dd2b8afe2@gmail.com> <1bc2bc14-e42a-8d9c-d47c-3afac05de347@2ndquadrant.com> <2615ea98-6537-1fcf-667a-09022063336a@postgrespro.ru> <17440.1535723980@sss.pgh.pa.us> From: Maksim Milyutin Message-ID: <91828914-cfa2-b186-01e3-68a39a77f497@gmail.com> Date: Fri, 7 Sep 2018 18:59:34 +0300 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-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 09/07/2018 06:05 PM, Peter Eisentraut wrote: > On 07/09/2018 11:59, Maksim Milyutin wrote: >> OK. However I think it would be helpful to leave the mention about >> setting necessary owner for tablespace directory. My final version of >> hint is "You might need to fix permissions on this directory or its >> parents or install the PostgreSQL system user as the owner of this >> directory." And updated version of patch is attached. > You are still proposing to hint that the permissions on the tablespace > directory might be correct but that the main database instance is > running under the wrong user. Not exactly this way. The case that motivated me to make this patch was the novice user after installing postgres from package (with setting up postgres user and initializing PGDATA with right permissions) tried to create the necessary tablespace directories from himself (the owner of those directories was that user). The error message "could not set permissions on directory ..." disoriented that user. The need to change the owner of those directories came after careful reading of documentation. I think it would be helpful to show the proposed hint to more operatively resolve the problem. -- Regards, Maksim Milyutin