Re: Wrong return code in vacuumdb when multiple jobs are used

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Julien Rouhaud <rjuju123@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-05-04T11:04:59Z
Lists: pgsql-hackers
On Sat, May 4, 2019 at 2:45 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Sat, May 04, 2019 at 10:35:23AM +0200, Julien Rouhaud wrote:
> > While reading vacuumdb code, I just noticed that it can return 0 if an
> > error happen when -j is used, if errors happen on the last batch of
> > commands.
>
> Yes, I agree that this is wrong.  GetIdleSlot() is much more careful
> about that than vacuum_one_database(), so your patch looks good at
> quick glance.
>

The fix looks good to me as well.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



Commits

  1. Fix error status of vacuumdb when multiple jobs are used