Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6fc3b7

Browse files
Fix query result leak during binary upgrade
9a974cb moved the query in binary_upgrade_set_pg_class_oids to theouter level, but left the PQclear and query buffer destruction in theis_index conditional.353708e fixed the leak of the query bufferbut left the PGresult leak. This moves clearing the result to the outerlevel ensuring that it will be called.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/374550C1-F4ED-4D9D-9498-0FD029CCF674@yesql.seBackpatch-through: v15
1 parenta826021 commite6fc3b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4980,8 +4980,6 @@ binary_upgrade_set_pg_class_oids(Archive *fout,
49804980
"SELECT pg_catalog.binary_upgrade_set_next_index_relfilenode('%u'::pg_catalog.oid);\n",
49814981
toast_index_relfilenode);
49824982
}
4983-
4984-
PQclear(upgrade_res);
49854983
}
49864984
else
49874985
{
@@ -4994,6 +4992,8 @@ binary_upgrade_set_pg_class_oids(Archive *fout,
49944992
relfilenode);
49954993
}
49964994

4995+
PQclear(upgrade_res);
4996+
49974997
appendPQExpBufferChar(upgrade_buffer, '\n');
49984998

49994999
destroyPQExpBuffer(upgrade_query);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp