shlogg · Early preview
Franck Pachot @franckpachot

Building Pg-hostname Extension For YugabyteDB

Compile & install pg-hostname extension for YugabyteDB: simplify hostname retrieval with `create extension hostname;` command

pg-hostname is a very simple extension, useful, especially on YugabyteDB that runs on multiple nodes. 
Without extensions, seeing on which host I am connected is limited:

yugabyte=# select inet_server_addr();
 inet_server_addr
------------------
 172.17.0.2
(1 row)
yugabyte=# show listen_addresses ;
 listen_addresses
------------------
 172.17.0.2
(1 row)

    
    

    
    




I have two problems with that. First, it is not easy to get the hostname from it. Second, if I start yugabyted --advertise_address=0.0.0.0 to listen on all interfaces, I get no useful information:

yugabyte=# select...