Re: BUG #16550: Problem with pg_service.conf - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: BUG #16550: Problem with pg_service.conf
Date
Msg-id CAMkU=1zgqq9H=VL7f0zcA3gQLB5qm1D8EO3HN96N6uPvpV_g-g@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16550: Problem with pg_service.conf  (Michał Lis <fcs1@poczta.onet.pl>)
Responses Re: BUG #16550: Problem with pg_service.conf
List pgsql-bugs
On Thu, Jul 23, 2020 at 10:26 AM Michał Lis <fcs1@poczta.onet.pl> wrote:
 
The connection service file can be:
-  a per-user service file at ~/.pg_service.conf
- or the location specified by the environment variable PGSERVICEFILE
- or it can be a system-wide file at `pg_config --sysconfdir`/pg_service.conf
- or in the directory specified by the environment variable PGSYSCONFDIR.


The last point talks the service file could placed into PGSYSCONFDIR.
Using PostrgeSQL on Windows the PGSYSCONFDIR leads into
D:\PostgreSQLx86\9.6\etc folder as a result of PG_config.exe. 
This folder normally is absent. I created it manually and then copy into it the pg_service.conf file.

So the bug is that the pg_service.conf file is not read from this location.

I can reproduce this after using the EDB installer to install.  

I create the directory indicated by `pg_config --sysconfdir`, put the pg_service.conf in it, and psql and pg_dump work without setting either PGSERVICEFILE or PGSYSCONFDIR. But pgbench and PgAdmin4 do not work with the service file this way, but do work if I define PGSERVICEFILE, so there does seem to be something buggy going on.

Cheers,

Jeff

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16476: pgp_sym_encrypt_bytea with compress-level=6 : Wrong key or corrupt data
Next
From: Jeff Janes
Date:
Subject: Re: BUG #16550: Problem with pg_service.conf