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

Commita8f87d5

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 parent98b4f53 commita8f87d5

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
@@ -5479,8 +5479,6 @@ binary_upgrade_set_pg_class_oids(Archive *fout,
54795479
"SELECT pg_catalog.binary_upgrade_set_next_index_relfilenode('%u'::pg_catalog.oid);\n",
54805480
toast_index_relfilenumber);
54815481
}
5482-
5483-
PQclear(upgrade_res);
54845482
}
54855483
else
54865484
{
@@ -5493,6 +5491,8 @@ binary_upgrade_set_pg_class_oids(Archive *fout,
54935491
relfilenumber);
54945492
}
54955493

5494+
PQclear(upgrade_res);
5495+
54965496
appendPQExpBufferChar(upgrade_buffer, '\n');
54975497

54985498
destroyPQExpBuffer(upgrade_query);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp