pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Wal receiver process listens to physical IP
2+ messages / 2 participants
[nested] [flat]

* Wal receiver process listens to physical IP
@ 2020-03-20 11:27  Mariya Rampurawala <Mariya.Rampurawala@veritas.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Mariya Rampurawala @ 2020-03-20 11:27 UTC (permalink / raw)
  To: pgsql-general

Hi,

I have been working on a project where I need to virtualize the postgresql standby server.
The wal receiver process listens to the Physical IP and a random port.
How can I configure it to listen to a VIP that the wal sender process can connect to?
Also, Is there a way I can configure the port number for this?


$ /usr/pgsql-12/bin/postgres -V

postgres (PostgreSQL) 12.2


postgresql.conf:

listen_addresses = '10.209.57.17'  • This is the VIP



$ ps -ef | grep post
postgres  2945     1  0 05:37 ?        00:00:00 /usr/pgsql-12/bin/postgres -D /pg_mnt/pg-12/data -h 10.209.57.17
postgres  2946  2945  0 05:37 ?        00:00:00 postgres: logger
postgres  2947  2945  0 05:37 ?        00:00:00 postgres: startup   recovering 000000010000000000000007
postgres  2952  2945  0 05:37 ?        00:00:00 postgres: checkpointer
postgres  2953  2945  0 05:37 ?        00:00:00 postgres: background writer
postgres  2954  2945  0 05:37 ?        00:00:00 postgres: stats collector
postgres  2955  2945  0 05:37 ?        00:00:04 postgres: walreceiver





$ netstat -anp | grep 55656
tcp        0      0 10.209.57.15:55656      10.209.57.16:5432       ESTABLISHED 2955/postgres: walr





10.209.57.15 is the physical IP


$ ps -ef | grep 2955
postgres  2955  2945  0 05:37 ?        00:00:04 postgres: walreceiver


Regards,
Mariya



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Wal receiver process listens to physical IP
@ 2020-03-20 13:32  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Mariya Rampurawala <Mariya.Rampurawala@veritas.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2020-03-20 13:32 UTC (permalink / raw)
  To: Mariya Rampurawala <Mariya.Rampurawala@veritas.com>; pgsql-general

On Fri, 2020-03-20 at 11:27 +0000, Mariya Rampurawala wrote:
> I have been working on a project where I need to virtualize the postgresql standby server.
> The wal receiver process listens to the Physical IP and a random port.
> How can I configure it to listen to a VIP that the wal sender process can connect to?
> Also, Is there a way I can configure the port number for this?
> 
> $ /usr/pgsql-12/bin/postgres -V
> postgres (PostgreSQL) 12.2
> 
> postgresql.conf:
> listen_addresses = '10.209.57.17'   This is the VIP
> 
> $ ps -ef | grep post
> postgres  2945     1  0 05:37 ?        00:00:00 /usr/pgsql-12/bin/postgres -D /pg_mnt/pg-12/data -h 10.209.57.17
> postgres  2946  2945  0 05:37 ?        00:00:00 postgres: logger   
> postgres  2947  2945  0 05:37 ?        00:00:00 postgres: startup   recovering 000000010000000000000007
> postgres  2952  2945  0 05:37 ?        00:00:00 postgres: checkpointer   
> postgres  2953  2945  0 05:37 ?        00:00:00 postgres: background writer   
> postgres  2954  2945  0 05:37 ?        00:00:00 postgres: stats collector   
> postgres  2955  2945  0 05:37 ?        00:00:04 postgres: walreceiver   
> 
> $ netstat -anp | grep 55656
> tcp        0      0 10.209.57.15:55656      10.209.57.16:5432       ESTABLISHED 2955/postgres: walr 
> 
> 10.209.57.15 is the physical IP
> 
> $ ps -ef | grep 2955
> postgres  2955  2945  0 05:37 ?        00:00:04 postgres: walreceiver 

The standby is *listening* on 10.209.57.17 for connections, but
the WAL receiver is not listening, it actively connects to the primary
server.  Obviously it is using the other network interface.

To change that, you would have to change the network route to the primary
server to lead through the virtual interface.
But I don't see any reason to do that.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-03-20 13:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 11:27 Wal receiver process listens to physical IP Mariya Rampurawala <Mariya.Rampurawala@veritas.com>
2020-03-20 13:32 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox