Re: pg_restore with -j fails (works without -j option)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore with -j fails (works without -j option)
Дата
Msg-id 27785.1314326505@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_restore with -j fails (works without -j option)  (Lonni J Friedman <netllama@gmail.com>)
Ответы Re: pg_restore with -j fails (works without -j option)  (Lonni J Friedman <netllama@gmail.com>)
Re: pg_restore with -j fails (works without -j option)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Lonni J Friedman <netllama@gmail.com> writes:
> [ this doesn't work: ]
> $ cat 2011-08-25-1314280801-nightly.out | pg_restore -j2 -U lfriedman -v -d nightly

It's basically impossible for that to work.  -j implies spawning
multiple processes that will be wanting to read concurrently from
different places in the input file.  That cannot happen when the source
is a pipe.  In this particular example, the pipe construct isn't even
doing anything useful; you could perfectly well write this instead:

$ pg_restore -j2 -U lfriedman -v -d nightly 2011-08-25-1314280801-nightly.out


> pg_restore: [custom archiver] cannot reopen stdin
> pg_restore: *** aborted because of error

I agree though that that's not a terribly friendly error message.
I thought we had some code in there to complain about non-seekable
input files, but it looks like we missed a case.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Martín Marqués
Дата:
Сообщение: Re: passing cursors from one PL function to another
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: passing cursors from one PL function to another