Re: [HACKERS] pg_basebackup behavior on non-existent slot
От | Magnus Hagander |
---|---|
Тема | Re: [HACKERS] pg_basebackup behavior on non-existent slot |
Дата | |
Msg-id | CABUevExQnM4ERa0yzR9CfjncNd5yuLsKOkM_U++JSShmRHX77A@mail.gmail.com обсуждение исходный текст |
Ответ на | [HACKERS] pg_basebackup behavior on non-existent slot (Jeff Janes <jeff.janes@gmail.com>) |
Ответы |
Re: [HACKERS] pg_basebackup behavior on non-existent slot
|
Список | pgsql-hackers |
On Mon, Sep 4, 2017 at 3:21 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
If I tell pg_basebackup to use a non-existent slot, it immediately reports an error. And then it exits with an error, but only after streaming the entire database contents.If you are doing this interactively and are on the ball, of course, you can hit ctrl-C when you see the error message.I don't know if this is exactly a bug, but it seems rather unfortunate.
I think that should qualify as a bug.
In 10 it will automatically create a transient slot in this case, but there might still be a case where you can provoke this.
Should the parent process of pg_basebackup be made to respond to SIGCHLD? Or call waitpid(bgchild, &status, WNOHANG) in some strategic loop?
I think it's ok to just call waitpid() -- we don't need to react super quickly, but we should react. And we should then exit the main process with an error before actually streaming everything.
В списке pgsql-hackers по дате отправления: