Re: [PATCH] Find additional connection service files in pg_service.conf.d directory

From: Curt Tilmes <curt(at)tilmes(dot)org>
To: a(dot)zakirov(at)postgrespro(dot)ru
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Find additional connection service files in pg_service.conf.d directory
Date: 2018-07-05 15:33:48
Message-ID: CAMv20O8fT8Bgdp7AuEHfvE4EEEWE6Zx28=10Xhp2WC0_5rTFvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 18, 2018 at 12:17 PM Arthur Zakirov
<a(dot)zakirov(at)postgrespro(dot)ru> wrote:
> I think when some error occured in searchServiceFileDirectory() then the
> error "definition of service \"%s\" not found" will be raised, because
> group_found is false. It may confuse as it hides a real error. For
> example, if permission is denied to open the directory.

Correct. The patch follows the model of the existing code. It keeps
looking for the
correct service until it either finds it or doesn't.

If you want to temporarily hide your pg_service.conf.d directory or
files by removing
permissions, it will work fine, correctly skipping over them. That is
not considered
an error. If there is a real syntax error in the file, just as for
the other files, that will
be reported as a syntax error.

If after looking in all the right places it doesn't find the service,
it will correctly report
that the service was not found.

Curt

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2018-07-05 15:36:21 Re: Global shared meta cache
Previous Message David Fetter 2018-07-05 15:32:51 Re: Regarding shared_preload_libraries (postgresql.conf file)