Add support for interface/ipaddress binding to libpq - Mailing list pgsql-hackers

From Grigory Kareev
Subject Add support for interface/ipaddress binding to libpq
Date
Msg-id CAPi2LfC=ZVYr2jzrPVdTCw4fvr8Vfa0RPcjWDBdtmzFD2Y+TyQ@mail.gmail.com
Whole thread Raw
List pgsql-hackers
<div dir="ltr">Hello!<br /><br />I'm willing to implement the 'Add support for interface/ipaddress binding to libpq'
featurefrom the ToDo list.<br />Actually, the 'ipaddress' part.<br /><br />For this I'm planning to do the
following:<br/>    - Introduce 'sourceaddr' parameter keyword and 'PGSOURCEADDR' env var which can be used to specify
localIPv4 or IPv6 ipaddress to bind to<br />    - Silently ignore the parameter's value in case of Unix-domain
communicationwith database<br />    - Use BLOCKING bind() call to bind communication socket to specified local
ipaddressin two functions:<br />        src/interfaces/libpq/fe-connect.c@internal_cancel()<br />       
src/interfaces/libpq/fe-connect.c@PQconnectPoll()<br/><br />Is this enough or I missed something?<br /><br />WBR,
Grigory.<br/></div> 

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.
Next
From: Robert Haas
Date:
Subject: Re: Change pg_cancel_*() to ignore current backend