show primary_conninfo unchanged after promotion?

From: Wiwwo Staff <wiwwo(at)wiwwo(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: show primary_conninfo unchanged after promotion?
Date: 2022-05-18 14:07:31
Message-ID: CAFe70G4Aqbthx2f8TRm=SoxEZOyHEuhj2wPY6=c-+LzczqacOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!
i might be doing something wrong, but I cannot see what...

Server is 14.3 (Debian 14.3-1.pgdg110+1)
(at the time of writing, in Dockerfile FROM postgres:14)

I have a 3 node cluster, starting with pg_red (172.26.0.2) as primary.
I promote pg_green (172.26.0.4) as new primary, all other aligned.

Now, on pg_green (172.26.0.4):

=# select inet_server_addr();
inet_server_addr
------------------
172.26.0.4

=# select pg_is_in_recovery();
pg_is_in_recovery
-------------------
f

=# select * from pg_stat_replication; (CUT)
pid | usesysid | usename | application_name | client_addr
-----+----------+---------+------------------+-------------
486 | 16,384 | rep | walreceiver | 172.21.0.2
625 | 16,384 | rep | walreceiver | 172.21.0.4

But, if I execute show primary_conninfo, i get
=# show primary_conninfo ;

primary_conninfo
------------------------------------------------------------------------------------------------------------------------------------------------------------
user=rep passfile='/.pgpass' channel_binding=prefer host=pg_red port=5432
sslmode=prefer sslcompression=0 sslsni=1 ssl_min_protocol_version=TLSv1.2 g.
.ssencmode=prefer krbsrvname=postgres target_session_attrs=any

which says primary is pg_red, which is the old primary.

What is that I am doing wrong?!?
Tnx!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Lawrence Barwick 2022-05-18 14:15:28 Re: show primary_conninfo unchanged after promotion?
Previous Message Christoph Moench-Tegeder 2022-05-18 10:32:50 Re: Who am I? Where am I connected?