Thread

  1. Bug in send()

    Dennis Fleurbaaij <dennis@core-lan.nl> — 2001-04-14T18:29:54Z

    Hi i'm developing a searchengine which uses PostgreSQL (duh:)
    
    I've fond erronuos behavour when I send a SIGTERM to my application when
    then query is in progress.. The send() loop will go out of control in an
    endless loop and that is clearly wrong.
    
    I'm not going into the source unless you say that's a good idea and send you
    some working code but you probably have a better oversight into the code and
    can make some more logical code then I can...
    
    This is the log;
    
    <SNIP>
    
    FATAL: pq_endmessage failed errno=32
    pq_flush: send() failed broken pipe
    
    </SNIP>
    
    This is IHMO an example of trying to do it right but forgetting how dumb
    users are. You obviously catch the SIGPIPE but then gerget to check the
    errno. It's a quick fix no doubt.
    
    Load goed to 100% btw.
    
    In anycase let me know what happens,
    
    Cheers,
    Dennis Fleurbaaij
    dennis@core-lan.nl
    
    
    
  2. Re: Bug in send()

    Tom Lane <tgl@sss.pgh.pa.us> — 2001-04-14T23:05:07Z

    Dennis Fleurbaaij <dennis@core-lan.nl> writes:
    > FATAL: pq_endmessage failed errno=32
    > pq_flush: send() failed broken pipe
    
    As near as I can tell, this is the trace of a backend exiting after the
    client program ungracefully quit.  If you want to argue that this is a
    Postgres bug then you will need to provide considerably more evidence.
    
    			regards, tom lane