Skip site navigation (1) Skip section navigation (2)

pg_restore accepts -j -1

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_restore accepts -j -1
Date: 2017-01-10 04:48:16
Message-ID: 20170110044815.GC18360@tamriel.snowman.net (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-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

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2017-01-10 04:57:56
Subject: Re: merging some features from plpgsql2 project
Previous:From: Jon NelsonDate: 2017-01-10 04:33:41
Subject: Re: [PATCH] guc-ify the formerly hard-coded MAX_SEND_SIZE to max_wal_send

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group