Re: [PATCH] Add SIGCHLD catch to psql

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: [PATCH] Add SIGCHLD catch to psql
Дата
Msg-id 20100515234607.GC22614@fetter.org
обсуждение исходный текст
Ответ на Re: [PATCH] Add SIGCHLD catch to psql  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: [PATCH] Add SIGCHLD catch to psql  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, May 14, 2010 at 04:24:43PM -0400, Bruce Momjian wrote:
> Stephen Frost wrote:
> -- Start of PGP signed section.
> > Greetings,
> > 
> >   Toying around with FETCH_COUNT today, I discovered that it didn't do
> >   the #1 thing I really wanted to use it for- query large tables without
> >   having to worry about LIMIT to see the first couple hundred records.
> >   The reason is simple- psql ignores $PAGER exiting, which means that it
> >   will happily continue pulling down the entire large table long after
> >   you've stopped caring, which means you still have to wait forever.
> > 
> >   The attached, admittedly quick hack, fixes this by having psql catch
> >   SIGCHLD's using handle_sigint.  I've tested this and it doesn't
> >   appear to obviously break other cases where we have children (\!, for
> >   example), since we're not going to be running a database query when
> >   we're doing those, and if we are, and the child dies, we probably want
> >   to *stop* anyway, similar to the $PAGER issue.
> > 
> >   Another approach that I considered was fixing various things to deal
> >   cleanly with write's failing to $PAGER (I presume the writes *were*
> >   failing, since less was in a defunct state, but I didn't actually
> >   test).  This solution was simpler, faster to code and check, and alot
> >   less invasive (or so it seemed to me at the time).
> > 
> >   Anyway, this makes FETCH_COUNT alot more useful, and, in my view, the
> >   current behaviour of completely ignoring $PAGER exiting is a bug.
> 
> Plesae add this to the next commit-fest:
> 
>     https://commitfest.postgresql.org/action/commitfest_view/inprogress
> 
> Thanks.

Wouldn't this count as a bug fix?

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Keepalive for max_standby_delay
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] Add SIGCHLD catch to psql