]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Reap the benefits of not having to avoid leaking PGresults.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Jul 2025 20:31:43 +0000 (16:31 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Jul 2025 20:31:43 +0000 (16:31 -0400)
commit80aa9848befc13c188d2775a859deaf172fdd3a2
treedc803979e278bda9d82fcd308f71868e5ad1d1be
parent7d8f5957792421ec3bb9d1b9b6ca25d689d974b7
Reap the benefits of not having to avoid leaking PGresults.

Remove a bunch of PG_TRY constructs, de-volatilize related
variables, remove some PQclear calls in error paths.
Aside from making the code simpler and shorter, this should
provide some marginal performance gains.

For ease of review, I did not re-indent code within the removed
PG_TRY constructs.  That'll be done in a separate patch.

Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Discussion: https://postgr.es/m/2976982.1748049023@sss.pgh.pa.us
contrib/dblink/dblink.c
contrib/postgres_fdw/connection.c
contrib/postgres_fdw/postgres_fdw.c
contrib/postgres_fdw/postgres_fdw.h
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/include/libpq/libpq-be-fe-helpers.h