Re: psql's \watch is broken
От
Michael Paquier
Тема
Re: psql's \watch is broken
Дата
Msg-id
20191217044032.GG2344@paquier.xyz
Ответ на
Re: psql's \watch is broken (Michael Paquier)
Список
Дерево обсуждения
psql's \watch is broken Jeff Janes <jeff.janes@gmail.com>
Re: psql's \watch is broken Fabien COELHO <coelho@cri.ensmp.fr>
Re: psql's \watch is broken Michael Paquier <michael@paquier.xyz>
Re: psql's \watch is broken Tom Lane <tgl@sss.pgh.pa.us>
Re: psql's \watch is broken Fabien COELHO <coelho@cri.ensmp.fr>
Re: psql's \watch is broken Michael Paquier <michael@paquier.xyz>
Re: psql's \watch is broken Michael Paquier <michael@paquier.xyz>
Re: psql's \watch is broken Fabien COELHO <coelho@cri.ensmp.fr>
Re: psql's \watch is broken Jeff Janes <jeff.janes@gmail.com>
On Mon, Dec 16, 2019 at 11:40:07AM +0900, Michael Paquier wrote: > As the concepts behind cancel_pressed and CancelRequested are > different, we need to keep cancel_pressed and make psql use it. And > the callback used for WIN32 also needs to set the flag. I also think > that we should do a better effort in documenting CancelRequested > properly in cancel.c. All that should be fixed as of the attached, > tested on Linux and from a Windows console. From a point of view of > consistency, this actually brings back the code of psql to the same > state as it was before a4fd3aa, except that we still have the > refactored pieces. Merging both flags can actually prove to be tricky, as we have some code paths involving --single-step where psql visibly assumes that a cancellation pressed does not necessarily imply one that succeeds is there is a cancellation object around (ExecQueryTuples, tuple printing and \copy). So I have fixed the issue by making the code of psql consistent with what we had before a4fd3aa. I think that it should be actually possible to merge CancelRequested and cancel_pressed while keeping the user-visible changes acceptable, and this requires a very careful lookup. -- Michael
В списке pgsql-hackers по дате отправления