]> git.sur5r.net Git - bacula/bacula/commit
Implement db_big_sql_query() that uses cursor on PostgreSQL and limit memory usage...
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 28 Jan 2011 13:41:55 +0000 (14:41 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Fri, 28 Jan 2011 13:57:26 +0000 (14:57 +0100)
commitb76e913f40eedc9ee06c5c5c70548df08046449b
tree608673ae4ff428bafd7bca5ef3927bf9bc041928
parenta031ba5bed761cbe42aa6fb7fac40c959c498f22
Implement db_big_sql_query() that uses cursor on PostgreSQL and limit memory usage in db_list_xxx

By default on PostgreSQL, db_sql_query() stores the query results in
memory, it can take lots of resources when dealing with job output,
accurate or restore.  This new mode uses cursors and fetches results
100 by 100.

db_list_xxx functions doesn't store the entire query result anymore.
Commands like "list joblog" or "list files" are now stable in memory
usage. (for MySQL and PostgreSQL)
bacula/src/cats/bdb_postgresql.h
bacula/src/cats/cats.h
bacula/src/cats/postgresql.c
bacula/src/cats/protos.h
bacula/src/cats/sql.c
bacula/src/cats/sql_get.c
bacula/src/cats/sql_glue.c
bacula/src/cats/sql_glue.h
bacula/src/cats/sql_list.c