From 385bc38415a9a6daa22acc3c14ba0cbc3d2c4466 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 1 Feb 2011 13:39:40 +0100 Subject: [PATCH] Close cursor in big sql query --- bacula/src/cats/postgresql.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- 2.39.5