Re: Expand the use of check_canonical_path() for more GUCs

2020-07-09 Thread Michael Paquier
On Thu, Jul 09, 2020 at 02:19:06PM +0200, Daniel Gustafsson wrote: > Re-reading this thread it seems to me that the conclusion is to mark the patch > Returned with Feedback in this commitfest, and possibly expand documentation > or > comments on path canonicalization in the code at some point. >

Re: Expand the use of check_canonical_path() for more GUCs

2020-07-09 Thread Daniel Gustafsson
Re-reading this thread it seems to me that the conclusion is to mark the patch Returned with Feedback in this commitfest, and possibly expand documentation or comments on path canonicalization in the code at some point. Does that seem fair? cheers ./daniel

Re: Expand the use of check_canonical_path() for more GUCs

2020-06-04 Thread Tom Lane
Peter Eisentraut writes: > This (and some other messages in this thread) appears to assume that > canonicalize_path() turns relative paths into absolute paths, but > AFAICT, it does not do that. Ah, fair point --- I'd been assuming that we were applying canonicalize_path as cleanup for an absol

Re: Expand the use of check_canonical_path() for more GUCs

2020-06-04 Thread Peter Eisentraut
On 2020-06-03 20:45, Tom Lane wrote: Robert Haas writes: On Tue, Jun 2, 2020 at 5:04 AM Peter Eisentraut wrote: The archeology reveals that these calls where originally added to canonicalize the data_directory and config_file settings (7b0f060d54), but that was then moved out of guc.c to be d

Re: Expand the use of check_canonical_path() for more GUCs

2020-06-03 Thread Michael Paquier
On Wed, Jun 03, 2020 at 02:45:50PM -0400, Tom Lane wrote: > In the abstract, I agree with Peter's point that we shouldn't alter > user-given strings without need. However, I think there's strong > reason for canonicalizing the data directory and config file locations. > We access those both before

Re: Expand the use of check_canonical_path() for more GUCs

2020-06-03 Thread Tom Lane
Robert Haas writes: > On Tue, Jun 2, 2020 at 5:04 AM Peter Eisentraut > wrote: >> The archeology reveals that these calls where originally added to >> canonicalize the data_directory and config_file settings (7b0f060d54), >> but that was then moved out of guc.c to be done early during postmaster

Re: Expand the use of check_canonical_path() for more GUCs

2020-06-03 Thread Robert Haas
On Tue, Jun 2, 2020 at 5:04 AM Peter Eisentraut wrote: > The archeology reveals that these calls where originally added to > canonicalize the data_directory and config_file settings (7b0f060d54), > but that was then moved out of guc.c to be done early during postmaster > startup (337ffcddba). The

Re: Expand the use of check_canonical_path() for more GUCs

2020-06-02 Thread Peter Eisentraut
On 2020-05-29 19:24, Robert Haas wrote: On Tue, May 19, 2020 at 7:02 AM Peter Eisentraut wrote: That thread didn't resolve why check_canonical_path() is necessary there. Maybe the existing uses could be removed? This first sentence of this reply seems worthy of particualr attention. We have

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-29 Thread Alvaro Herrera
On 2020-May-28, Mark Dilger wrote: > A little poking around shows that in SelectConfigFiles(), these four > directories were set by SetConfigOption(). I don't see a problem with > the code, but the way this stuff is spread around makes it easy for > somebody adding a new GUC file path to do it wr

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-29 Thread Robert Haas
On Tue, May 19, 2020 at 7:02 AM Peter Eisentraut wrote: > That thread didn't resolve why check_canonical_path() is necessary > there. Maybe the existing uses could be removed? This first sentence of this reply seems worthy of particualr attention. We have to know what problem this is intended to

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-28 Thread Mark Dilger
> On May 20, 2020, at 12:03 AM, Michael Paquier wrote: > > On Tue, May 19, 2020 at 09:32:15AM -0400, Tom Lane wrote: >> Hm, I'm pretty certain that data_directory does not need this because >> canonicalization is done elsewhere; the most that you could accomplish >> there is to cause problems.

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-20 Thread Kyotaro Horiguchi
At Wed, 20 May 2020 10:05:29 +0200, Peter Eisentraut wrote in > On 2020-05-20 09:13, Michael Paquier wrote: > > On Tue, May 19, 2020 at 01:02:12PM +0200, Peter Eisentraut wrote: > >> That thread didn't resolve why check_canonical_path() is necessary > >> there. > >> Maybe the existing uses could

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-20 Thread Peter Eisentraut
On 2020-05-20 09:13, Michael Paquier wrote: On Tue, May 19, 2020 at 01:02:12PM +0200, Peter Eisentraut wrote: That thread didn't resolve why check_canonical_path() is necessary there. Maybe the existing uses could be removed? This would impact log_directory, external_pid_file, stats_temp_direc

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-20 Thread Michael Paquier
On Tue, May 19, 2020 at 01:02:12PM +0200, Peter Eisentraut wrote: > That thread didn't resolve why check_canonical_path() is necessary there. > Maybe the existing uses could be removed? This would impact log_directory, external_pid_file, stats_temp_directory, where it is still useful to show to th

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-20 Thread Michael Paquier
On Tue, May 19, 2020 at 09:32:15AM -0400, Tom Lane wrote: > Hm, I'm pretty certain that data_directory does not need this because > canonicalization is done elsewhere; the most that you could accomplish > there is to cause problems. Dunno about the rest. Hmm. I missed that this is getting done i

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-19 Thread Tom Lane
Michael Paquier writes: > While digging into my backlog, I have found this message from Peter E > mentioning about $subject: > https://www.postgresql.org/message-id/e6aac026-174c-9952-689f-6bee76f9a...@2ndquadrant.com > It seems to me that it would be a good idea to make those checks more > consi

Re: Expand the use of check_canonical_path() for more GUCs

2020-05-19 Thread Peter Eisentraut
On 2020-05-19 09:09, Michael Paquier wrote: While digging into my backlog, I have found this message from Peter E mentioning about $subject: https://www.postgresql.org/message-id/e6aac026-174c-9952-689f-6bee76f9a...@2ndquadrant.com It seems to me that it would be a good idea to make those checks