Re: pg_restore accepts -j -1

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_restore accepts -j -1
Date: 2017-01-11 16:48:25
Message-ID: 20170111164825.GL18360@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ashutosh,

* Stephen Frost (sfrost(at)snowman(dot)net) wrote:
> Attached patch adds the same check to pg_restore that's in pg_dump
> already. Looks like it should back-patch to 9.3 pretty cleanly and I'll
> add a similar check for 9.2.

After playing with this, it seems entirely wrong to wait until after we
try to open the archive before we finish checking the validity of the
options, so I moved these checks up to a more sensible location.

> Any thoughts about adding the Windows-specific MAXIMUM_WAIT_OBJECTS
> check to 9.2 pg_restore..? It certainly looks entirely straight-forward
> to do, and though I don't recall hearing anyone complaining about trying
> to run pg_restore on Windows with lots of jobs and having it fall over,
> it might avoid a bit of frustration for anyone who does try.

The more I think about it, the more it seems like this is something we
should have back-patched when we added that check, so I'll go ahead and
add that check to 9.2 also.

Updated patch attached.

I'll plan to push these changes later on this afternoon.

Thanks!

Stephen

Attachment Content-Type Size
check_numworkers_pg_restore_master_v2.patch text/x-diff 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Glukhov 2017-01-11 16:54:10 Re: PATCH: recursive json_populate_record()
Previous Message Pavel Stehule 2017-01-11 16:45:56 Re: merging some features from plpgsql2 project