On Fri, Jan 1, 2016 at 4:40 PM, Amit Kapila <amit.kapil...@gmail.com> wrote:

> On Wed, Dec 30, 2015 at 10:31 PM, Shay Rojansky <r...@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
>> <https://gist.github.com/roji/33df4e818c5d64a607aa> 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. --->
dException: Could not load type
'System.Reflection.CustomAttributeExtensions' fr
om assembly 'mscorlib, Version=, Culture=neutral,
   at Npgsql.NpgsqlConnectionStringBuilder.<>c.<.cctor>b__8_0(PropertyInfo
   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

Reply via email to