Re: list append syntax for postgresql.conf

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: list append syntax for postgresql.conf
Date: 2019-02-20 15:35:33
Message-ID: CAHE3wgi5tNrLDNWrLfxz654y9FYZue0G=2+5A+Q-4KuZgtBE+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em qua, 20 de fev de 2019 às 12:15, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> escreveu:
>
> Nowadays there are a number of methods for composing multiple
> postgresql.conf files for modularity. But if you have a bunch of things
> you want to load via shared_preload_libraries, you have to put them all
> in one setting. How about some kind of syntax for appending something
> to a list, like
>
Partial setting could confuse users, no? I see the usefulness of such
feature but I prefer to implement it via ALTER SYSTEM. Instead of += I
prefer to add another option to ALTER SYSTEM that appends new values
such as:

ALTER SYSTEM APPEND shared_preload_libraries TO 'pg_stat_statements,
pg_prewarm';

and it will expand to:

shared_preload_libraries = 'foo, bar, pg_stat_statements, pg_prewarm'

> shared_preload_libraries += 'pg_stat_statements'
>
What happen if you have:

shared_preload_libraries = 'foo'

then

shared_preload_libraries += 'bar'

and then

shared_preload_libraries = 'pg_stat_statements'

You have only 'pg_stat_statements' or 'foo, bar, pg_stat_statements'?

Suppose you mistype 'bar' as 'baz', do you have only 'pg_stat_statements'?

--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2019-02-20 15:37:19 Re: list append syntax for postgresql.conf
Previous Message Peter Eisentraut 2019-02-20 15:15:42 list append syntax for postgresql.conf