Re: Feature: Use DNS SRV records for connecting

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Feike Steenbergen <feikesteenbergen(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Feature: Use DNS SRV records for connecting
Date: 2019-08-14 18:01:43
Message-ID: 20190814180143.62533ohqlaqcl7so@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2019-08-13 10:43:07 -0400, Tom Lane wrote:
> How would we get at that data without writing our own DNS client?
> (AFAIK, our existing DNS interactions are all handled by getnameinfo()
> or other library-supplied functions.)

> Maybe that'd be worth doing, but it sounds like a lot of work and a
> lot of new code to maintain, relative to the value of the feature.

It might have enough independent advantages to make it worthwhile
though.

Right now our non-blocking interfaces aren't actually in a number of
cases, due to name resolution being blocking. While that's documented,
it imo means that our users need to use a non-blocking DNS library, if
they need non-blocking PQconnectPoll() - it's imo not that practical to
just use IPs in most cases.

We also don't have particularly good control over the order of hostnames
returned by getaddrinfo, which makes it harder to implement reliable
round-robin etc.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-08-14 18:04:27 Re: proposal: make NOTIFY list de-duplication optional
Previous Message Ashwin Agrawal 2019-08-14 17:32:22 Re: Zedstore - compressed in-core columnar storage