Re: libpq host/hostaddr/conninfo inconsistencies

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: libpq host/hostaddr/conninfo inconsistencies
Дата
Msg-id alpine.DEB.2.21.1902211527260.27203@lancre
обсуждение исходный текст
Ответ на Re: libpq host/hostaddr/conninfo inconsistencies  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: libpq host/hostaddr/conninfo inconsistencies  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello Tom,

> My only complaint about this is that it makes it sound like you *must*
> provide "host", even when giving "hostaddr":

That is the idea, "hostaddr" is moslty never needed.

It is the initial misleading issue I've been complaining about: one can 
specify an IP *both* in host (although it is not documented) and in 
hostaddr... and when both are provided, things started being messy: the 
information displayed was plain wrong (eg telling you that you were 
connected to an IP when you were really connected to another), and one 
could not get the actual information about the current connection out of 
libpq.

A committed patch has fixed the display (\conninfo) and connection 
(\c) issues by extending libpq and being carefull about the message 
displayed or the information used to reconnect, which were basically bug 
fixes.

About host/hostaddr, my initial submission was to force "host" as the 
target (whether name, directory, or ip which already work) and "hostaddr" 
only as a lookup shortcut, which is I think its initial intended use. This 
has been rejected.

Now I'm just trying to improve the documentation so that at least it 
reflects what is done, and implicitely advise about how to use the 
features properly even if it is not enforced: Basically, a user should 
always used "host" for all purposes because it works, and that makes one 
parameter for one purpose, and "hostaddr" is only needed for lookup 
shortcut, which is basically a very rare and specialized use case.

-- 
Fabien.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: MikalaiKeida@ibagroup.eu
Дата:
Сообщение: RE: Timeout parameters
Следующее
От: Andreas Karlsson
Дата:
Сообщение: Re: Journal based VACUUM FULL