[HACKERS] Debian "postgresql-common" config check issue with pg10 - Mailing list pgsql-hackers

From Fabien COELHO
Subject [HACKERS] Debian "postgresql-common" config check issue with pg10
Date
Msg-id alpine.DEB.2.20.1705081730030.3983@lancre
Whole thread Raw
Responses [HACKERS] Re: [Pkg-postgresql-public] Debian "postgresql-common" config checkissue with pg10
List pgsql-hackers
Hello Peter,

Although this is really a small debian packaging issue, I cc to pgdev 
because it illustrates unintended consequences of trivial changes.

Thanks (again!) to the great and up-to-date apt.postgresql.org repository, 
I've tried to test the new scram-sha-256 feature. For that I looked in 
"postgres.conf" and found:
  #password_encryption = md5      # md5, scram-sha-256 or plain

Thus I naïvely added:
  password_encryption = scram-sha-256

After:
  sh> pg_ctlcluster 10 main start

The result is:
  Error: Invalid line 88 in /etc/postgresql/10/main/postgresql.conf:    »password_encryption = scram-sha-256«

However, it works if I put 'scram-sha-256' (with simple quotes).

The underlying issue is that the '-' character breaks the config checker, 
ISTM that the simple value regex in function "read_conf_file" in module 
"PgCommon.pm" should be extended to allow more chars in unquoted strings, 
to be consistent with lexer definitions in 
"src/backend/utils/misc/guc-file.l".

I think that the issue appeared when 'scram' was changed to 
'scram-sha-256' recently, as it is the first option enum with a dash, 
all other options use '_'.

In passing, I would like to point out that the French quotation chevrons 
(guillemets) used on the wrong sides and without spacing is probably eye 
watering pain to any French reader, maybe like using ß in place of B in a 
text. Also utf8 chars might not work properly under some terminal 
encodings. Maybe using simple ascii ">>" and "<<" for the messages would 
also be more portable?

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] pgbench tap tests & minor fixes
Next
From: Christoph Berg
Date:
Subject: [HACKERS] Re: [Pkg-postgresql-public] Debian "postgresql-common" config checkissue with pg10