<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/src/interfaces/libpq/exports.txt, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/'/>
<entry>
<title>De-Revert "Add support for Kerberos credential delegation"</title>
<updated>2023-04-13T12:55:07+00:00</updated>
<author>
<name>Stephen Frost</name>
<email>sfrost@snowman.net</email>
</author>
<published>2023-04-13T12:55:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=6633cfb21691840c33816a6dacaca0b504efb895'/>
<id>6633cfb21691840c33816a6dacaca0b504efb895</id>
<content type='text'>
This reverts commit 3d03b24c3 (Revert Add support for Kerberos
credential delegation) which was committed on the grounds of concern
about portability, but on further review and discussion, it's clear that
we are better off explicitly requiring MIT Kerberos as that appears to
be the only GSSAPI library currently that's under proper maintenance
and ongoing development.  The API used for storing credentials was added
to MIT Kerberos over a decade ago while for the other libraries which
appear to be mainly based on Heimdal, which exists explicitly to be a
re-implementation of MIT Kerberos, the API never made it to a released
version (even though it was added to the Heimdal git repo over 5 years
ago..).

This post-feature-freeze change was approved by the RMT.

Discussion: https://postgr.es/m/ZDDO6jaESKaBgej0%40tamriel.snowman.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3d03b24c3 (Revert Add support for Kerberos
credential delegation) which was committed on the grounds of concern
about portability, but on further review and discussion, it's clear that
we are better off explicitly requiring MIT Kerberos as that appears to
be the only GSSAPI library currently that's under proper maintenance
and ongoing development.  The API used for storing credentials was added
to MIT Kerberos over a decade ago while for the other libraries which
appear to be mainly based on Heimdal, which exists explicitly to be a
re-implementation of MIT Kerberos, the API never made it to a released
version (even though it was added to the Heimdal git repo over 5 years
ago..).

This post-feature-freeze change was approved by the RMT.

Discussion: https://postgr.es/m/ZDDO6jaESKaBgej0%40tamriel.snowman.net
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Add support for Kerberos credential delegation"</title>
<updated>2023-04-08T11:21:35+00:00</updated>
<author>
<name>Stephen Frost</name>
<email>sfrost@snowman.net</email>
</author>
<published>2023-04-08T11:21:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=3d03b24c350ab060bb223623bdff38835bd7afd0'/>
<id>3d03b24c350ab060bb223623bdff38835bd7afd0</id>
<content type='text'>
This reverts commit 3d4fa227bce4294ce1cc214b4a9d3b7caa3f0454.

Per discussion and buildfarm, this depends on APIs that seem to not
be available on at least one platform (NetBSD).  Should be certainly
possible to rework to be optional on that platform if necessary but bit
late for that at this point.

Discussion: https://postgr.es/m/3286097.1680922218@sss.pgh.pa.us
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3d4fa227bce4294ce1cc214b4a9d3b7caa3f0454.

Per discussion and buildfarm, this depends on APIs that seem to not
be available on at least one platform (NetBSD).  Should be certainly
possible to rework to be optional on that platform if necessary but bit
late for that at this point.

Discussion: https://postgr.es/m/3286097.1680922218@sss.pgh.pa.us
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for Kerberos credential delegation</title>
<updated>2023-04-08T01:58:04+00:00</updated>
<author>
<name>Stephen Frost</name>
<email>sfrost@snowman.net</email>
</author>
<published>2023-04-08T01:58:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=3d4fa227bce4294ce1cc214b4a9d3b7caa3f0454'/>
<id>3d4fa227bce4294ce1cc214b4a9d3b7caa3f0454</id>
<content type='text'>
Support GSSAPI/Kerberos credentials being delegated to the server by a
client.  With this, a user authenticating to PostgreSQL using Kerberos
(GSSAPI) credentials can choose to delegate their credentials to the
PostgreSQL server (which can choose to accept them, or not), allowing
the server to then use those delegated credentials to connect to
another service, such as with postgres_fdw or dblink or theoretically
any other service which is able to be authenticated using Kerberos.

Both postgres_fdw and dblink are changed to allow non-superuser
password-less connections but only when GSSAPI credentials have been
delegated to the server by the client and GSSAPI is used to
authenticate to the remote system.

Authors: Stephen Frost, Peifeng Qiu
Reviewed-By: David Christensen
Discussion: https://postgr.es/m/CO1PR05MB8023CC2CB575E0FAAD7DF4F8A8E29@CO1PR05MB8023.namprd05.prod.outlook.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support GSSAPI/Kerberos credentials being delegated to the server by a
client.  With this, a user authenticating to PostgreSQL using Kerberos
(GSSAPI) credentials can choose to delegate their credentials to the
PostgreSQL server (which can choose to accept them, or not), allowing
the server to then use those delegated credentials to connect to
another service, such as with postgres_fdw or dblink or theoretically
any other service which is able to be authenticated using Kerberos.

Both postgres_fdw and dblink are changed to allow non-superuser
password-less connections but only when GSSAPI credentials have been
delegated to the server by the client and GSSAPI is used to
authenticate to the remote system.

Authors: Stephen Frost, Peifeng Qiu
Reviewed-By: David Christensen
Discussion: https://postgr.es/m/CO1PR05MB8023CC2CB575E0FAAD7DF4F8A8E29@CO1PR05MB8023.namprd05.prod.outlook.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Add PQsendFlushRequest to libpq</title>
<updated>2021-06-29T18:37:39+00:00</updated>
<author>
<name>Alvaro Herrera</name>
<email>alvherre@alvh.no-ip.org</email>
</author>
<published>2021-06-29T18:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=a7192326c74da417d024a189da4d33c1bf1b40b6'/>
<id>a7192326c74da417d024a189da4d33c1bf1b40b6</id>
<content type='text'>
This new libpq function allows the application to send an 'H' message,
which instructs the server to flush its outgoing buffer.

This hasn't been needed so far because the Sync message already requests
a buffer; and I failed to realize that this was needed in pipeline mode
because PQpipelineSync also causes the buffer to be flushed.  However,
sometimes it is useful to request a flush without establishing a
synchronization point.

Backpatch to 14, where pipeline mode was introduced in libpq.

Reported-by: Boris Kolpackov &lt;boris@codesynthesis.com&gt;
Author: Álvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://postgr.es/m/202106252350.t76x73nt643j@alvherre.pgsql
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This new libpq function allows the application to send an 'H' message,
which instructs the server to flush its outgoing buffer.

This hasn't been needed so far because the Sync message already requests
a buffer; and I failed to realize that this was needed in pipeline mode
because PQpipelineSync also causes the buffer to be flushed.  However,
sometimes it is useful to request a flush without establishing a
synchronization point.

Backpatch to 14, where pipeline mode was introduced in libpq.

Reported-by: Boris Kolpackov &lt;boris@codesynthesis.com&gt;
Author: Álvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://postgr.es/m/202106252350.t76x73nt643j@alvherre.pgsql
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename PQtraceSetFlags() to PQsetTraceFlags().</title>
<updated>2021-06-11T04:56:13+00:00</updated>
<author>
<name>Noah Misch</name>
<email>noah@leadboat.com</email>
</author>
<published>2021-06-11T04:56:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=d0e750c0acaf31f60667b1635311bcef5ab38bbe'/>
<id>d0e750c0acaf31f60667b1635311bcef5ab38bbe</id>
<content type='text'>
We have a dozen PQset*() functions.  PQresultSetInstanceData() and this
were the libpq setter functions having a different word order.  Adopt
the majority word order.

Reviewed by Alvaro Herrera and Robert Haas, though this choice of name
was not unanimous.

Discussion: https://postgr.es/m/20210605060555.GA216695@rfd.leadboat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have a dozen PQset*() functions.  PQresultSetInstanceData() and this
were the libpq setter functions having a different word order.  Adopt
the majority word order.

Reviewed by Alvaro Herrera and Robert Haas, though this choice of name
was not unanimous.

Discussion: https://postgr.es/m/20210605060555.GA216695@rfd.leadboat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix incautious handling of possibly-miscoded strings in client code.</title>
<updated>2021-06-07T18:15:25+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2021-06-07T18:15:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=42f94f56bf9559f0a3cf5f3ffde50655834694ee'/>
<id>42f94f56bf9559f0a3cf5f3ffde50655834694ee</id>
<content type='text'>
An incorrectly-encoded multibyte character near the end of a string
could cause various processing loops to run past the string's
terminating NUL, with results ranging from no detectable issue to
a program crash, depending on what happens to be in the following
memory.

This isn't an issue in the server, because we take care to verify
the encoding of strings before doing any interesting processing
on them.  However, that lack of care leaked into client-side code
which shouldn't assume that anyone has validated the encoding of
its input.

Although this is certainly a bug worth fixing, the PG security team
elected not to regard it as a security issue, primarily because
any untrusted text should be sanitized by PQescapeLiteral or
the like before being incorporated into a SQL or psql command.
(If an app fails to do so, the same technique can be used to
cause SQL injection, with probably much more dire consequences
than a mere client-program crash.)  Those functions were already
made proof against this class of problem, cf CVE-2006-2313.

To fix, invent PQmblenBounded() which is like PQmblen() except it
won't return more than the number of bytes remaining in the string.
In HEAD we can make this a new libpq function, as PQmblen() is.
It seems imprudent to change libpq's API in stable branches though,
so in the back branches define PQmblenBounded as a macro in the files
that need it.  (Note that just changing PQmblen's behavior would not
be a good idea; notably, it would completely break the escaping
functions' defense against this exact problem.  So we just want a
version for those callers that don't have any better way of handling
this issue.)

Per private report from houjingyi.  Back-patch to all supported branches.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An incorrectly-encoded multibyte character near the end of a string
could cause various processing loops to run past the string's
terminating NUL, with results ranging from no detectable issue to
a program crash, depending on what happens to be in the following
memory.

This isn't an issue in the server, because we take care to verify
the encoding of strings before doing any interesting processing
on them.  However, that lack of care leaked into client-side code
which shouldn't assume that anyone has validated the encoding of
its input.

Although this is certainly a bug worth fixing, the PG security team
elected not to regard it as a security issue, primarily because
any untrusted text should be sanitized by PQescapeLiteral or
the like before being incorporated into a SQL or psql command.
(If an app fails to do so, the same technique can be used to
cause SQL injection, with probably much more dire consequences
than a mere client-program crash.)  Those functions were already
made proof against this class of problem, cf CVE-2006-2313.

To fix, invent PQmblenBounded() which is like PQmblen() except it
won't return more than the number of bytes remaining in the string.
In HEAD we can make this a new libpq function, as PQmblen() is.
It seems imprudent to change libpq's API in stable branches though,
so in the back branches define PQmblenBounded as a macro in the files
that need it.  (Note that just changing PQmblen's behavior would not
be a good idea; notably, it would completely break the escaping
functions' defense against this exact problem.  So we just want a
version for those callers that don't have any better way of handling
this issue.)

Per private report from houjingyi.  Back-patch to all supported branches.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve PQtrace() output format</title>
<updated>2021-03-30T23:12:34+00:00</updated>
<author>
<name>Alvaro Herrera</name>
<email>alvherre@alvh.no-ip.org</email>
</author>
<published>2021-03-30T23:12:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=198b3716dba68544b55cb97bd120738a86d5df2d'/>
<id>198b3716dba68544b55cb97bd120738a86d5df2d</id>
<content type='text'>
Transform the PQtrace output format from its ancient (and mostly
useless) byte-level output format to a logical-message-level output,
making it much more usable.  This implementation allows the printing
code to be written (as it indeed was) by looking at the protocol
documentation, which gives more confidence that the three (docs, trace
code and actual code) actually match.

Author: 岩田 彩 (Aya Iwata) &lt;iwata.aya@fujitsu.com&gt;
Reviewed-by: 綱川 貴之 (Takayuki Tsunakawa) &lt;tsunakawa.takay@fujitsu.com&gt;
Reviewed-by: Kirk Jamison &lt;k.jamison@fujitsu.com&gt;
Reviewed-by: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Reviewed-by: 黒田 隼人 (Hayato Kuroda) &lt;kuroda.hayato@fujitsu.com&gt;
Reviewed-by: "Nagaura, Ryohei" &lt;nagaura.ryohei@jp.fujitsu.com&gt;
Reviewed-by: Ryo Matsumura &lt;matsumura.ryo@fujitsu.com&gt;
Reviewed-by: Greg Nancarrow &lt;gregn4422@gmail.com&gt;
Reviewed-by: Jim Doty &lt;jdoty@pivotal.io&gt;
Reviewed-by: Álvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://postgr.es/m/71E660EB361DF14299875B198D4CE5423DE3FBA4@g01jpexmbkw25
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Transform the PQtrace output format from its ancient (and mostly
useless) byte-level output format to a logical-message-level output,
making it much more usable.  This implementation allows the printing
code to be written (as it indeed was) by looking at the protocol
documentation, which gives more confidence that the three (docs, trace
code and actual code) actually match.

Author: 岩田 彩 (Aya Iwata) &lt;iwata.aya@fujitsu.com&gt;
Reviewed-by: 綱川 貴之 (Takayuki Tsunakawa) &lt;tsunakawa.takay@fujitsu.com&gt;
Reviewed-by: Kirk Jamison &lt;k.jamison@fujitsu.com&gt;
Reviewed-by: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Reviewed-by: 黒田 隼人 (Hayato Kuroda) &lt;kuroda.hayato@fujitsu.com&gt;
Reviewed-by: "Nagaura, Ryohei" &lt;nagaura.ryohei@jp.fujitsu.com&gt;
Reviewed-by: Ryo Matsumura &lt;matsumura.ryo@fujitsu.com&gt;
Reviewed-by: Greg Nancarrow &lt;gregn4422@gmail.com&gt;
Reviewed-by: Jim Doty &lt;jdoty@pivotal.io&gt;
Reviewed-by: Álvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://postgr.es/m/71E660EB361DF14299875B198D4CE5423DE3FBA4@g01jpexmbkw25
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement pipeline mode in libpq</title>
<updated>2021-03-15T21:13:42+00:00</updated>
<author>
<name>Alvaro Herrera</name>
<email>alvherre@alvh.no-ip.org</email>
</author>
<published>2021-03-15T21:13:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=acb7e4eb6b1c614c68a62fb3a6a5bba1af0a2659'/>
<id>acb7e4eb6b1c614c68a62fb3a6a5bba1af0a2659</id>
<content type='text'>
Pipeline mode in libpq lets an application avoid the Sync messages in
the FE/BE protocol that are implicit in the old libpq API after each
query.  The application can then insert Sync at its leisure with a new
libpq function PQpipelineSync.  This can lead to substantial reductions
in query latency.

Co-authored-by: Craig Ringer &lt;craig.ringer@enterprisedb.com&gt;
Co-authored-by: Matthieu Garrigues &lt;matthieu.garrigues@gmail.com&gt;
Co-authored-by: Álvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Reviewed-by: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-by: Aya Iwata &lt;iwata.aya@jp.fujitsu.com&gt;
Reviewed-by: Daniel Vérité &lt;daniel@manitou-mail.org&gt;
Reviewed-by: David G. Johnston &lt;david.g.johnston@gmail.com&gt;
Reviewed-by: Justin Pryzby &lt;pryzby@telsasoft.com&gt;
Reviewed-by: Kirk Jamison &lt;k.jamison@fujitsu.com&gt;
Reviewed-by: Michael Paquier &lt;michael.paquier@gmail.com&gt;
Reviewed-by: Nikhil Sontakke &lt;nikhils@2ndquadrant.com&gt;
Reviewed-by: Vaishnavi Prabakaran &lt;VaishnaviP@fast.au.fujitsu.com&gt;
Reviewed-by: Zhihong Yu &lt;zyu@yugabyte.com&gt;

Discussion: https://postgr.es/m/CAMsr+YFUjJytRyV4J-16bEoiZyH=4nj+sQ7JP9ajwz=B4dMMZw@mail.gmail.com
Discussion: https://postgr.es/m/CAJkzx4T5E-2cQe3dtv2R78dYFvz+in8PY7A8MArvLhs_pg75gg@mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pipeline mode in libpq lets an application avoid the Sync messages in
the FE/BE protocol that are implicit in the old libpq API after each
query.  The application can then insert Sync at its leisure with a new
libpq function PQpipelineSync.  This can lead to substantial reductions
in query latency.

Co-authored-by: Craig Ringer &lt;craig.ringer@enterprisedb.com&gt;
Co-authored-by: Matthieu Garrigues &lt;matthieu.garrigues@gmail.com&gt;
Co-authored-by: Álvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Reviewed-by: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-by: Aya Iwata &lt;iwata.aya@jp.fujitsu.com&gt;
Reviewed-by: Daniel Vérité &lt;daniel@manitou-mail.org&gt;
Reviewed-by: David G. Johnston &lt;david.g.johnston@gmail.com&gt;
Reviewed-by: Justin Pryzby &lt;pryzby@telsasoft.com&gt;
Reviewed-by: Kirk Jamison &lt;k.jamison@fujitsu.com&gt;
Reviewed-by: Michael Paquier &lt;michael.paquier@gmail.com&gt;
Reviewed-by: Nikhil Sontakke &lt;nikhils@2ndquadrant.com&gt;
Reviewed-by: Vaishnavi Prabakaran &lt;VaishnaviP@fast.au.fujitsu.com&gt;
Reviewed-by: Zhihong Yu &lt;zyu@yugabyte.com&gt;

Discussion: https://postgr.es/m/CAMsr+YFUjJytRyV4J-16bEoiZyH=4nj+sQ7JP9ajwz=B4dMMZw@mail.gmail.com
Discussion: https://postgr.es/m/CAJkzx4T5E-2cQe3dtv2R78dYFvz+in8PY7A8MArvLhs_pg75gg@mail.gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bugs in OpenSSL hook renaming.</title>
<updated>2020-05-16T23:44:49+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2020-05-16T23:44:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=e78b93094518b1e262cba8115470f252dde6f446'/>
<id>e78b93094518b1e262cba8115470f252dde6f446</id>
<content type='text'>
libpq's exports.txt was overlooked in commit 36d108761, which the
buildfarm is quite unhappy about.

Also, I'd gathered that the plan included renaming PQgetSSLKeyPassHook
to PQgetSSLKeyPassHook_OpenSSL, but that didn't happen in the patch
as committed.  I'm taking it on my own authority to do so now, since
the window before beta1 is closing fast.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libpq's exports.txt was overlooked in commit 36d108761, which the
buildfarm is quite unhappy about.

Also, I'd gathered that the plan included renaming PQgetSSLKeyPassHook
to PQgetSSLKeyPassHook_OpenSSL, but that didn't happen in the patch
as committed.  I'm taking it on my own authority to do so now, since
the window before beta1 is closing fast.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove PQsslpassword function</title>
<updated>2019-12-07T14:20:53+00:00</updated>
<author>
<name>Andrew Dunstan</name>
<email>andrew@dunslane.net</email>
</author>
<published>2019-12-07T14:20:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=e75b1e33710249d1699850920c0390fb08ea5673'/>
<id>e75b1e33710249d1699850920c0390fb08ea5673</id>
<content type='text'>
This partially reverts commit 4dc6355210.

The information returned by the function can be obtained by calling
PQconninfo(), so the function is redundant.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This partially reverts commit 4dc6355210.

The information returned by the function can be obtained by calling
PQconninfo(), so the function is redundant.
</pre>
</div>
</content>
</entry>
</feed>
