Re: [HACKERS] pg_restore accepts -j -1 - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [HACKERS] pg_restore accepts -j -1
Date
Msg-id 20170111164825.GL18360@tamriel.snowman.net
Whole thread Raw
In response to Re: [HACKERS] pg_restore accepts -j -1  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Ashutosh,

* Stephen Frost (sfrost@snowman.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

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] merging some features from plpgsql2 project
Next
From: Nikita Glukhov
Date:
Subject: Re: [HACKERS] PATCH: recursive json_populate_record()