pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: vacuumdb: enable parallel mode
3+ messages / 3 participants
[nested] [flat]

* pgsql: vacuumdb: enable parallel mode
@ 2015-01-23 18:06  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Alvaro Herrera @ 2015-01-23 18:06 UTC (permalink / raw)
  To: pgsql-committers

vacuumdb: enable parallel mode

This mode allows vacuumdb to open several server connections to vacuum
or analyze several tables simultaneously.

Author: Dilip Kumar.  Some reworking by Álvaro Herrera
Reviewed by: Jeff Janes, Amit Kapila, Magnus Hagander, Andres Freund

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a17923204736d8842eade3517d6a8ee81290fca4

Modified Files
--------------
doc/src/sgml/ref/vacuumdb.sgml |   24 ++
src/bin/pg_dump/parallel.c     |    2 +-
src/bin/scripts/common.c       |   23 +-
src/bin/scripts/common.h       |    6 +
src/bin/scripts/vacuumdb.c     |  797 ++++++++++++++++++++++++++++++++--------
5 files changed, 691 insertions(+), 161 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: vacuumdb: enable parallel mode
@ 2015-03-21 11:08  Michael Paquier <michael.paquier@gmail.com>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Paquier @ 2015-03-21 11:08 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers

On Sat, Jan 24, 2015 at 3:06 AM, Alvaro Herrera <alvherre@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

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Attachments:

vacuumdb-pqsendq.patch (text/x-patch, 691B) download 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,
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: pgsql: vacuumdb: enable parallel mode
@ 2015-03-23 19:00  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Alvaro Herrera @ 2015-03-23 19:00 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-committers

Michael Paquier wrote:
> On Sat, Jan 24, 2015 at 3:06 AM, Alvaro Herrera <alvherre@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:

Should be fixed now, thanks.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2015-03-23 19:00 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 18:06 pgsql: vacuumdb: enable parallel mode Alvaro Herrera <alvherre@alvh.no-ip.org>
2015-03-21 11:08 ` Michael Paquier <michael.paquier@gmail.com>
2015-03-23 19:00   ` Alvaro Herrera <alvherre@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox