Re: OpenFile() Permissions Refactor

From: David Steele <david(at)pgmasters(dot)net>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: OpenFile() Permissions Refactor
Date: 2017-09-24 13:47:41
Message-ID: 8df820d0-18e1-95b7-8524-b44f9e1db4a3@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/23/17 10:22 AM, Peter Eisentraut wrote:
> On 9/13/17 10:26, David Steele wrote:
>> Here's a new patch based on your review. Where I had a question I made
>> a choice as described below:
>
> I have committed the changes to the file APIs and a fix for the umask
> save/restore issue.

Thank you!

> The mkdir changes didn't really inspire me. Replacing mkdir() with
> MakeDirectoryPerm() without any change in functionality doesn't really
> improve clarity.

OK. I had hoped removing the need to specify the mode at every call
site was functionality enough. Even so, I'm a little surprised you
didn't keep PG_DIR_MODE_DEFAULT.

> Maybe we'll revisit that when your next patches arrive.

The next patch set was be this same refactor on the tools (initdb,
pg_rewind, etc), but if you think the mkdir refactor did not add enough
value then I'll rethink my plans.

I may need to present all the patches in one CF so it's clear where all
this is going: allowing group read on $PGDATA.

Thanks,
--
-David
david(at)pgmasters(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-09-24 14:15:33 Re: Built-in plugin for logical decoding output
Previous Message Peter Eisentraut 2017-09-24 12:04:46 Re: ICU locales and text/char(n) SortSupport on Windows