pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Igor Korot <ikorot01@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Fwd: Log file
Date: Mon, 29 Oct 2018 14:56:06 -0400
Message-ID: <18469.1540839366@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+FnnTw5Z=XoV=GyeC0-x85Q_MdJ0+hr6UD1Y5=NByG4SfzxyQ@mail.gmail.com>
References: <CA+FnnTy4b=gSVw+dJwijoiFoeQNQMKZq65feupZgJh4-uuyKVQ@mail.gmail.com>
	<CA+FnnTw5Z=XoV=GyeC0-x85Q_MdJ0+hr6UD1Y5=NByG4SfzxyQ@mail.gmail.com>

Igor Korot <ikorot01@gmail.com> 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 "<current_user><current_user>"?

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




view thread (26+ messages)  latest in thread

Message-ID: <18469.1540839366@sss.pgh.pa.us>
Permalink:  ../18469.1540839366@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18469.1540839366@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ikorot01@gmail.com
  Subject: Re: Fwd: Log file
  In-Reply-To: <18469.1540839366@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox