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

Commit0ae05c1

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 parent315661e commit0ae05c1

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
@@ -5127,8 +5127,6 @@ binary_upgrade_set_pg_class_oids(Archive *fout,
51275127
"SELECT pg_catalog.binary_upgrade_set_next_index_relfilenode('%u'::pg_catalog.oid);\n",
51285128
toast_index_relfilenumber);
51295129
}
5130-
5131-
PQclear(upgrade_res);
51325130
}
51335131
else
51345132
{
@@ -5141,6 +5139,8 @@ binary_upgrade_set_pg_class_oids(Archive *fout,
51415139
relfilenumber);
51425140
}
51435141

5142+
PQclear(upgrade_res);
5143+
51445144
appendPQExpBufferChar(upgrade_buffer, '\n');
51455145

51465146
destroyPQExpBuffer(upgrade_query);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp