From: | Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Dangling Client Backend Process |
Date: | 2015-10-27 05:29:18 |
Message-ID: | BF2827DCCE55594C8D7A8F7FFD3AB7715996C01F@szxeml521-mbs.china.huawei.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 23 October 2015 01:58, Robert Haas [mailto:robertmhaas(at)gmail(dot)com] Wrote:
>Well, I'm not buying this extra PostmasterIsAlive() call on every pass
>through the main loop. That seems more expensive than we can really
>justify. Checking this when we're already calling WaitLatchOrSocket is
>basically free, but the other part is not.
Agree.
>Here's a version with that removed and some changes to the comments.
Thanks for changing.
>I still don't think this is quite working right, though, because here's
>what happened when I killed the postmaster:
>
>rhaas=# select 1;
> ?column?
>----------
> 1
>(1 row)
>
>rhaas=# \watch
>Watch every 2s Thu Oct 22 16:24:10 2015
>
> ?column?
>----------
> 1
>(1 row)
>
>Watch every 2s Thu Oct 22 16:24:12 2015
>
> ?column?
>----------
> 1
>(1 row)
>
>Watch every 2s Thu Oct 22 16:24:14 2015
>
> ?column?
>----------
> 1
>(1 row)
>
>Watch every 2s Thu Oct 22 16:24:16 2015
>
> ?column?
>----------
> 1
>(1 row)
>
>server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
>The connection to the server was lost. Attempting reset: Failed.
>
>Note that the error message doesn't actually show up on the client (it
>did show up in the log). I guess that may be inevitable if we're
>blocked in secure_write(), but if we're in secure_read() maybe it should
>work? I haven't investigated why it doesn't.
Actually in this case client is not waiting for the response from the server rather it is waiting for new command from user.
So even though server has sent the response to client, client is not able to receive.
Once client receives the next command to execute, by the time connection has terminated from server side and hence it comes out with the above message (i.e. server closed the connection...)
Though I am also in favor of providing some error message to client. But with the current infrastructure, I don’t think there is any way to pass this error message to client [This error has happened without involvement of the client side].
Comments?
Thanks and Regards,
Kumar Rajeev Rastogi
From | Date | Subject | |
---|---|---|---|
Next Message | Kouhei Kaigai | 2015-10-27 05:46:15 | Re: [DESIGN] ParallelAppend |
Previous Message | Amit Kapila | 2015-10-27 05:01:47 | Re: questions about PG update performance |