Re: closesocket behavior in different platforms

From: amul sul <sulamul(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: closesocket behavior in different platforms
Date: 2020-01-29 14:47:49
Message-ID: CAAJ_b94UWYa3G=7U0D7iA3CjT91NGJu1yzV1qLJC=Ena01MLJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 29, 2020 at 4:34 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:

> On Tue, Jan 21, 2020 at 11:22 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> wrote:
> >
> > On Fri, Dec 6, 2019 at 11:24 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> > >

[...]

>
> Thanks for your review and suggestion. I have made a patch based on
> similar lines. Attached patch has the doc update with the explanation.
> Thoughts?
>

Hi Vignesh,

I have looked into the patch, realised that some format tagging and
the grammar changes are needed. Commented inline below:

+
+ <para>
+ You will get server closed the connection unexpectedly message while

The error message is usually wrapped inside the <computeroutput> tag.

+ trying to execute sql command on disconnected connection. The message
is

Also, s/disconnected connection/the disconnected connection

+ slightly different in windows and non-windows. In non-windows, you
will

s/in windows/on <systemitem class="osname">Windows</systemitem>
s/In non-windows/On non-windows

+ see a FATAL message before the error message:

How about : On non-window you'll see a fatal error as below.

+<screen>
+FATAL: terminating connection due to idle-in-transaction timeout
+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: Succeeded.
+</screen>
+ In windows, you might not see the FATAL message:

s/In windows /On <systemitem class="osname">Windows</systemitem>
s/FATAL message/fatal error

+<screen>
+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: Succeeded.
+</screen>
+ This message "FATAL: terminating connection due to
idle-in-transaction

Usually <quote> for doubt-quoting is used. Here think, we should remove FATA
L
and wrap the error message text inside <computeroutput> tag.

+ timeout" that is sent from server will not be displayed in windows,

How about : that is sent from the server will not be displayed on windows.

+ however it will be present in the log file. The reason for this is, in

s/however/However
s/in/on

+ windows the client cannot receive the message sent by the server when
the

s/windows/Windows or <systemitem class="osname">Windows</systemitem>

+ server has closed the client connection. This behavior can be noticed
when
+ the client connection has been disconnected because of
+ idle_in_transaction_session_timeout, pg_terminate_backend, pg_ctl kill
+ TERM and drop database with (force).

s/idle_in_transaction_session_timeout/<xref
linkend="guc-idle-in-transaction-session-timeout"/>
s/pg_terminate_backend/<function>pg_terminate_backend()</function>
s/pg_ctl kill TERM/<command>DROP DATABASE ... WITH ( FORCE )</command>

Regards,
Amul

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-01-29 14:47:52 Re: [Proposal] Global temporary tables
Previous Message Fujii Masao 2020-01-29 14:24:09 Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (but not seq_tup_read)