Re: pgsql: Add 'basebackup_to_shell' contrib module.

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pgsql: Add 'basebackup_to_shell' contrib module.
Дата
Msg-id 04e52bc8-1fa6-49c6-738e-c3b3f7b9e360@dunslane.net
обсуждение исходный текст
Ответ на Re: pgsql: Add 'basebackup_to_shell' contrib module.  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 3/29/22 17:19, Robert Haas wrote:
> On Tue, Mar 29, 2022 at 4:36 PM Thomas Munro <thomas.munro@gmail.com> wrote:
>> It failed:
>>
>> https://cirrus-ci.com/task/5567070686412800
>>
https://api.cirrus-ci.com/v1/artifact/task/5567070686412800/log/contrib/basebackup_to_shell/tmp_check/log/001_basic_primary.log
>>
https://api.cirrus-ci.com/v1/artifact/task/5567070686412800/log/contrib/basebackup_to_shell/tmp_check/log/regress_log_001_basic
> Hmm. The log here is not very informative. It just says that the first
> time we tried to use the 'shell' target, it timed out. I suppose the
> most obvious explanation for that is that the shell command we
> executed timed out:
>
> qq{type con > "$escaped_backup_path\\\\%f"}
>
> But why should that be so? Does 'type con' not respond to EOF? I don't
> see how that can be the case. Is our implementation of pclose broken?
> If so, then I think COPY TO/FROM PROGRAM would be broken on Windows.
>

AIUI 'type con' is not the equivalent of Unix cat, especially w.r.t.
stdin. It's going to try to read from the console, not from stdin. It's
more the equivalent of 'cat /dev/tty'. So it's not at all surprising
that it hangs. I don't know of a Windows builtin that is equivalent to cat.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Add 'basebackup_to_shell' contrib module.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Frontend error logging style