Re: BUG #16550: Problem with pg_service.conf

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: fcs1(at)poczta(dot)onet(dot)pl, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16550: Problem with pg_service.conf
Date: 2020-07-21 18:07:23
Message-ID: CAKFQuwasr=ncj50yDj3quB7XMkqOhPUd5_Au2XN6yy12xmLwfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jul 21, 2020 at 10:16 AM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 16550
> Logged by: Michal L
> Email address: fcs1(at)poczta(dot)onet(dot)pl
> PostgreSQL version: 9.6.11
> Operating system: Windows 7 x64 Pro/Ultimate
> Description:
>
> I can't connect to a database via service defined in pg_service.conf file
> from remote machine.
>

This is unlikely to be a bug.

The error message is necessary for others to provide assistance. Sending
an email with that, and possibly more, detail and asking for help to the
-general list would be an appropriate next step.

Demonstrating that such a connection can be made with a complete psql
command line invocation would help.

Connection from local machine using this service definition works fine.
>

Which is odd but further lessens the likelihood that this is a bug.

The other problem is with the localization of the pg_service.conf file.
> Reading internet solutions, I found, that this file may be placed in global
> configuration folder. In my case it is D:\PostgrSQLx86\9.6\etc (the
> SYSCONFDIR variable displayed by pg_config.exe).

Placing the file into this folder does not work.
>

The absence of an "e" in PostgrSQL seems suspicious...

> I had to define the global system variable PGSERVICEFILE =
> D:\PostgrSQLx86\9.6\etc\pg_service.conf.
> After that the connection to database via service began work, but only on
> local machine.
>

...though the same typo is here so maybe it's fine. I'm still inclined to
believe that either a typo exists, or maybe a user permission issue, before
thinking it was a bug.

Doubt it matters but you should also include the full 9.6.x version on the
email to -general. If that discussion turns up a demonstrable bug then
this report should be amended to include its details.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michał Lis 2020-07-21 20:44:17 Re: BUG #16550: Problem with pg_service.conf
Previous Message David G. Johnston 2020-07-21 17:53:35 Re: pg_dump's "--exclude-table" and "--exclude-table-data" options are ignored and/or cause the dump to fail entirely unless both the schema and table name use 1950s-era identifiers.