Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHChy-0001iQ-MT for pgsql-general@arkaria.postgresql.org; Mon, 29 Oct 2018 18:56:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHChw-0007uv-5R for pgsql-general@arkaria.postgresql.org; Mon, 29 Oct 2018 18:56:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHChv-0007um-Pu for pgsql-general@lists.postgresql.org; Mon, 29 Oct 2018 18:56:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHCht-0000v1-De for pgsql-general@postgresql.org; Mon, 29 Oct 2018 18:56:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w9TIu6pG018470; Mon, 29 Oct 2018 14:56:06 -0400 From: Tom Lane To: Igor Korot cc: pgsql-general Subject: Re: Fwd: Log file In-reply-to: References: Comments: In-reply-to Igor Korot message dated "Mon, 29 Oct 2018 11:56:03 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18468.1540839366.1@sss.pgh.pa.us> Date: Mon, 29 Oct 2018 14:56:06 -0400 Message-ID: <18469.1540839366@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Igor Korot writes: > I'm trying to test the functionality of logging on my older Mac with > PostgreSQL 9.1. > I see that the logile is created with the owner of postgres and the > group of wheel. Well, more specifically, it's created under the OS user & group that the server is running under. > Is there a way to make it open with ""? What current user? The SQL user name might not correspond to any OS-level entity at all. Even if it did, it's quite unlikely that the OS would permit the server process to create files owned by some other OS user --- doing so would be a giant security risk. > Or I will have to change the owner/group manuall every time I will > access the file? You can set up the log files as readable by the OS group of the server (see log_file_mode), and then grant membership in that group to whichever OS accounts you trust. You may also need to move the log directory out from under $PGDATA to make that work, since PG doesn't like world-readable data directories. regards, tom lane