postgresql custom variable in pg_settings table

From: Yi Sun <yinan81(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: postgresql custom variable in pg_settings table
Date: 2024-01-09 07:38:28
Message-ID: CABWY_HCPQ6c65aBPHSHMXg43SACBxWOd9Vq8Wyut7hGy6Y1qHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Best Regards
SY

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios - cloud 2024-01-09 08:18:10 Re: postgresql custom variable in pg_settings table
Previous Message 1111hqshj 2024-01-09 03:22:12 Make NUM_XLOGINSERT_LOCKS configurable