From: Eric Bollengier Date: Tue, 1 Feb 2011 12:39:40 +0000 (+0100) Subject: Close cursor in big sql query X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=385bc38415a9a6daa22acc3c14ba0cbc3d2c4466;p=bacula%2Fbacula Close cursor in big sql query --- diff --git a/bacula/src/cats/postgresql.c b/bacula/src/cats/postgresql.c index a0cb1302a1..598b39f7d1 100644 --- a/bacula/src/cats/postgresql.c +++ b/bacula/src/cats/postgresql.c @@ -510,9 +510,10 @@ bool B_DB_POSTGRESQL::db_big_sql_query(const char *query, } while (m_num_rows > 0); /* TODO: Can probably test against 100 */ - sql_free_result(); + sql_query("CLOSE _bac_cursor"); Dmsg0(500, "db_big_sql_query finished\n"); + sql_free_result(); retval = true; bail_out: