Re: [HACKERS] Re: Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-24 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: I think that still this kind of problems can be there at other places in code. I checked few places and suspecting secure_read() can also have similar problem: case SSL_ERROR_SSL: ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION),

Re: [HACKERS] Re: Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-24 Thread Tom Lane
I wrote: Amit Kapila amit.kapil...@gmail.com writes: In general it is responsibility of caller to take care of errno handling, but I am not sure it is taken care well at all places in code and the chances of such problems were less earlier because there was less chance that ereport would

Re: [HACKERS] Re: Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-24 Thread Amit Kapila
On Sun, Nov 24, 2013 at 10:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: I think that still this kind of problems can be there at other places in code. I checked few places and suspecting secure_read() can also have similar problem: case

Re: [HACKERS] Re: Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-23 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: On Fri, Nov 22, 2013 at 9:30 AM, Amit Kapila amit.kapil...@gmail.com wrote: I could think of below possible ways to fix the problem: a. in function pvsnprintf(), save the errno before setting it to 0 and then before exiting function reset it back to

Re: [HACKERS] Re: Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-23 Thread Amit Kapila
On Sun, Nov 24, 2013 at 4:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Fri, Nov 22, 2013 at 9:30 AM, Amit Kapila amit.kapil...@gmail.com wrote: Again looking at it, I think better fix would be to restore 'errno' from 'edata-saved_errno' in