agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedFrom: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Pgbouncer
Date: Thu, 16 Nov 2023 14:17:18 +0200
Message-ID: <ceb9b035-0e8e-5565-1be0-7f736fb10d2f@cloud.gatewaynet.com> (raw)
In-Reply-To: <suqrxftd5i2rd4y2oprgv27xqd2bjhtncgph7m5duwvwndqs5y@wjc235it7xey>
References: <CAJk5AtZTtHghs=88cONaW0rOHXRdeNLbUiKNgQOFcqKP4sK6yg@mail.gmail.com>
<suqrxftd5i2rd4y2oprgv27xqd2bjhtncgph7m5duwvwndqs5y@wjc235it7xey>
On 11/16/23 13:59, Erik Wienhold wrote:
> On 2023-11-16 06:43 +0100, Rajesh Kumar wrote:
>> I am using postgres 15 in redhat openshift container. I am trying to
>> configure pgbouncer.
>>
>> I want to know how to find in database whether the connections are from
>> pgbouncer or direct connections? Or, is there any other way to monitor in
>> this environment?
> You can check column pg_stat_activity.client_addr if your pgbouncer and
> the clients making direct connections are on different hosts.
>
> Otherwise you can list pgbouncer's connections with SHOW SERVERS in the
> admin console[1] and cross-check with pg_stat_activity. Columns
> local_addr and local_port of SHOW SERVERS matches client_addr and
> client_port in pg_stat_activity. The remaining connections in
> pg_stat_activity should be from other clients and backends.
In addition to what Erik said, there is pgbouncer_fdw, which makes
several pg_bouncer real time monitoring data available as foreign
tables, so you can join pg_stat_activity with pgbouncer_servers
and draw conclusions.
>
> [1]https://www.pgbouncer.org/usage.html#admin-console
>
view thread (17+ messages) latest in thread
Message-ID: <ceb9b035-0e8e-5565-1be0-7f736fb10d2f@cloud.gatewaynet.com>
Permalink: ../ceb9b035-0e8e-5565-1be0-7f736fb10d2f@cloud.gatewaynet.com/
Also on: postgresql.org/message-id/ceb9b035-0e8e-5565-1be0-7f736fb10d2f@cloud.gatewaynet.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: a.mantzios@cloud.gatewaynet.com, pgsql-admin@lists.postgresql.org
Subject: Re: Pgbouncer
In-Reply-To: <ceb9b035-0e8e-5565-1be0-7f736fb10d2f@cloud.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox