I did some more experimentation and concluded that actually, this problem has nothing whatsoever to do with pager invocations. What seems to really be happening is that libreadline activates its SIGWINCH handler only while it's being called to collect input, which is fine in itself, but *it does not notice screen resizes that happen when the handler is not active*.
You can prove this by doing, say, "select pg_sleep(10);" and resizing the window before the backend comes back. Readline never notices the resize, even though no pager invocation happens at all. So I now think that print.c shouldn't be involved at all, and the right thing to do is just have gets_interactive() invoke the resize function immediately before calling readline(). That will still leave a window for SIGWINCH to be missed, but it's a pretty tiny one. And somebody oughta report this as a libreadline bug ... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers