Re: Some 9.5beta2 backend processes not terminating properly? - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Some 9.5beta2 backend processes not terminating properly?
Date
Msg-id CAA4eK1KdGUGynNfdz+S8TAw4y2_3MikD8=s6oLkQX1V4mxfuyw@mail.gmail.com
Whole thread Raw
In response to Re: Some 9.5beta2 backend processes not terminating properly?  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Some 9.5beta2 backend processes not terminating properly?
List pgsql-hackers
On Fri, Jan 1, 2016 at 4:40 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
On Wed, Dec 30, 2015 at 10:31 PM, Shay Rojansky <roji@roji.org> wrote:
OK, I finally found some time to dive into this.

The backends seem to hang when the client closes a socket without first sending a Terminate message - some of the tests make this happen. I've confirmed this happens with 9.5rc1 running on Windows (versions 10 and 7), but this does not occur on Ubuntu 15.10. The client runs on Windows as well (although I doubt that's important).

In case it helps, here's a gist with some .NET code that uses Npgsql 3.0.4 to reproduce this.


I am trying to setup an environment to reproduce this issue.
I have installed Npgsql as below:
PM> Install-Package Npgsql -Version 3.0.4
Installing 'Npgsql 3.0.4'.
Successfully installed 'Npgsql 3.0.4'.

Now, I am trying to use program.cs present in the above link, but
it is neither printing any error nor able to perform any action.
I have just created program.cs file as mentioned by you in one
of the test folders and then trying to run it via:

>program.cs "Host=localhost;Username=amit;Database=postgres"

This program neither prints any error, nor I think it does any action.


I think, I need to create Visual C# project to use the program.cs code
mentioned by you and by implementing it as Visual C# Console Application,
I am able to build and run it, but getting below error:

Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'Npgsql.NpgsqlConnectionStringBuilder' threw an exception. ---> System.TypeLoa
dException: Could not load type 'System.Reflection.CustomAttributeExtensions' fr
om assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56
1934e089'.
   at Npgsql.NpgsqlConnectionStringBuilder.<>c.<.cctor>b__8_0(PropertyInfo p)
   at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Npgsql.NpgsqlConnectionStringBuilder..cctor()
   --- End of inner exception stack trace ---
   at Npgsql.NpgsqlConnectionStringBuilder..ctor(String connectionString)
   at Npgsql.NpgsqlConnection.set_ConnectionString(String value)
   at Npgsql.NpgsqlConnection..ctor(String connectionString)
   at PGHang.Program.Main() in E:\PG_Patch\ConsoleApplication1\Program.cs:line 11
Press any key to continue . . .


On googling, it seems this is related to .Net framework compatibility. I am
using .Net Framework 4 to build the program.cs and that is what I have
on my m/c.  Are you using the same for Npgsql or some different version?


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Making tab-complete.c easier to maintain
Next
From: Tom Lane
Date:
Subject: Re: strange behaviour of psql \e command