From: | Achilleas Mantzios - cloud <a(dot)mantzios(at)cloud(dot)gatewaynet(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: postgresql custom variable in pg_settings table |
Date: | 2024-01-09 08:18:10 |
Message-ID: | 1e556c27-dfc2-30be-ff10-851645cae2a2@cloud.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 1/9/24 09:38, Yi Sun wrote:
> Hello,
>
> We custom set variable
>
> Added patroni.nodes_count = 2 in postgresql.conf
>
> postgres=# show patroni.nodes_count;
> patroni.nodes_count
> ---------------------
> 2
> (1 row)
>
> postgres=# select current_setting('patroni.nodes_count');
> current_setting
> -----------------
> 2
> (1 row)
>
> But can not select it from pg_settings, as we use pgwatch2 to monitor,
> to avoid pgwatch2 script change prefer to use pg_setting not
> current_setting() function, is it possible to get the custom variable
> from pg_setting please? Thanks
You may look into pg_file_settings :
select setting from pg_file_settings where name = 'patroni.nodes_count';
>
> Best Regards
> SY
From | Date | Subject | |
---|---|---|---|
Next Message | Paul van der Linden | 2024-01-09 10:28:42 | Order of multicolumn gist index |
Previous Message | Yi Sun | 2024-01-09 07:38:28 | postgresql custom variable in pg_settings table |