On Sat, Jan 24, 2015 at 3:06 AM, Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote:
> vacuumdb: enable parallel mode
>
> This mode allows vacuumdb to open several server connections to vacuum
> or analyze several tables simultaneously.

Coverity is still complaining about this block of code where the
return code of PQsendQuery() is not checked:
        if (async)
        {
                if (echo)
                        printf("%s\n", sql);

                PQsendQuery(conn, sql);
        }
Could it be possible to get that fixed soon? Alvaro, attached is the
patch that you wrote to fix this stuff.
Regards,
-- 
Michael
diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c
index 8e4e613..a320b55 100644
--- a/src/bin/scripts/vacuumdb.c
+++ b/src/bin/scripts/vacuumdb.c
@@ -668,14 +668,21 @@ run_vacuum_command(PGconn *conn, const char *sql, bool echo,
 				   const char *dbname, const char *table,
 				   const char *progname, bool async)
 {
+	int		status;
+
 	if (async)
 	{
 		if (echo)
 			printf("%s\n", sql);
 
-		PQsendQuery(conn, sql);
+		status = PQsendQuery(conn, sql);
 	}
-	else if (!executeMaintenanceCommand(conn, sql, echo))
+	else
+	{
+		status = executeMaintenanceCommand(conn, sql, echo);
+	}
+
+	if (!status)
 	{
 		if (table)
 			fprintf(stderr,
-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to