From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Copy and store addrinfo in libpq-owned private memory
Date: Wed, 29 Mar 2023 20:00:19 +0000
Message-ID: <E1phbxy-000MCs-BL@gemulon.postgresql.org> (raw)
Copy and store addrinfo in libpq-owned private memory
This refactors libpq to copy addrinfos returned by getaddrinfo to
memory owned by libpq such that future improvements can alter for
example the order of entries.
As a nice side effect of this refactor the mechanism for iteration
over addresses in PQconnectPoll is now identical to its iteration
over hosts.
Author: Jelte Fennema <postgres@jeltef.nl>
Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
Reviewed-by: Michael Banck <mbanck@gmx.net>
Reviewed-by: Andrey Borodin <amborodin86@gmail.com>
Discussion: https://postgr.es/m/PR3PR83MB04768E2FF04818EEB2179949F7A69@PR3PR83MB0476.EURPRD83.prod.outlook.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/44d85ba5a3361dea371d23bd91777ef4c0c4e506
Modified Files
--------------
src/include/libpq/pqcomm.h | 6 ++
src/interfaces/libpq/fe-connect.c | 112 +++++++++++++++++++++++++++-----------
src/interfaces/libpq/libpq-int.h | 7 ++-
src/tools/pgindent/typedefs.list | 1 +
4 files changed, 92 insertions(+), 34 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Copy and store addrinfo in libpq-owned private memory
In-Reply-To: <E1phbxy-000MCs-BL@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox