pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: pgsql-hackers@postgresql.org
Subject: pg_restore accepts -j -1
Date: Mon, 9 Jan 2017 23:48:16 -0500
Message-ID: <20170110044815.GC18360@tamriel.snowman.net> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Greetings,

For reasons which seem likely to be entirely unintentional, pg_restore
will accept a '-1' for -j:

pg_restore -j -1

This seems to result in the parallel state being NULL and so things
don't outright break, but it hardly seems likely to be what the user was
asking for- my guess is that they actually wanted "parallel, single
transaction", which we don't actually support:

-> pg_restore -j 2 -1
pg_restore: cannot specify both --single-transaction and multiple jobs

We also don't accept -1 for pg_dump:

-> pg_dump -j -1
pg_dump: invalid number of parallel jobs

If I'm missing something, please let me know, otherwise I'll plan to put
the same check into pg_restore which exists in pg_dump.

Thanks!

Stephen

Attachments:

  [application/pgp-signature] signature.asc (818B, ../20170110044815.GC18360@tamriel.snowman.net/2-signature.asc)
  download

view thread (5+ messages)  latest in thread

Message-ID: <20170110044815.GC18360@tamriel.snowman.net>
Permalink:  ../20170110044815.GC18360@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20170110044815.GC18360@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: sfrost@snowman.net
  Subject: Re: pg_restore accepts -j -1
  In-Reply-To: <20170110044815.GC18360@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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