On 13 Aug 2019, at 11:50, Feike Steenbergen <feikesteenber...@gmail.com> wrote:

> I'd like to get some feedback on whether or not implementing a DNS SRV feature
> for connecting to PostgreSQL would be desirable/useful.

A big +1.

We currently use SRV records to tell postgresql what kind of server it is. This 
way all of our postgresql servers have an identical configuration, they just 
tailor themselves on startup as appropriate:

_postgresql-master._tcp.sql.example.com.

The above record in our case declares who the master is. If the postgresql 
startup says “hey, that’s me” it configures itself as a master. If the 
postgresql startup says “hey, that’s not me” it configures itself as a slave of 
the master.

We also use TXT records to define the databases we want (with protection 
against DNS security issues, we never remove a database based on a TXT record, 
but signed DNS records will help here).

_postgresql.sql.example.com TXT "v=PGSQL1;d=mydb;u=myuser"

We use a series of systemd “daemons” that are configured to run before and 
after postgresql to do the actual configuration on bootup, but it would be 
great if postgresql could just do this out the box.

Regards,
Graham
—

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to