![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
"echo $?" after it happens yields "141." There is no "141" in /usr/include/sys/errno.h. |
#3
| |||
| |||
|
|
I recently upgraded from 7.4.2 to 7.4.6 and have run into a new problem. As frequently as not, maybe even most times, when I "q" out of paging the output of a query in psql: Instead of just quitting that query, I get dumped straight out of psql. To add insult to injury: The command history for the current session isn't saved. "echo $?" after it happens yields "141." |
|
I'm guessing it's some kind of race condition. |
#4
| |||
| |||
|
|
Jim Seymour wrote: "echo $?" after it happens yields "141." There is no "141" in /usr/include/sys/errno.h. Exit code 141 means signal 141 - 128 = 13 = SIGPIPE. I haven't finished thinking what that means in this case, though ... |
#5
| |||||
| |||||
|
|
jseymour (AT) linxnet (DOT) com (Jim Seymour) writes: I recently upgraded from 7.4.2 to 7.4.6 and have run into a new problem. As frequently as not, maybe even most times, when I "q" out of paging the output of a query in psql: Instead of just quitting that query, I get dumped straight out of psql. To add insult to injury: The command history for the current session isn't saved. "echo $?" after it happens yields "141." 141-128 = 13 = SIGPIPE. So psql is getting sigpipe'd. |
|
The question is why? It is set up to ignore SIGPIPE everywhere that it could reasonably expect to get it, in particular from writing to the pager. |
|
I'm guessing it's some kind of race condition. The timing condition involved is probably whether or not psql has finished writing all of the query result to the pager before you quit the pager. So if you retrieve a large query result and "q" immediately you can probably make it more reproducible. |
, so... Anyway, I tried it on a query that|
Also, I don't think we changed that stuff between 7.4.2 and 7.4.6 (though I haven't trawled the commit logs to make sure). Was your 7.4.2 installation also built with --enable-thread-safety? |
|
It seems likely that addition or removal of --enable-thread-safety would make a difference. |
![]() |
| Thread Tools | |
| Display Modes | |
| |