# PostgreSQLFeatureLayer causes Log error in database Log file

**URL:** <https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584>\
**Category:** WinForms\
**Created:** [August 4, 2009, 2:48pm UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584 "2009-08-04T14:48:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rose](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rose](https://community.thinkgeo.com/u/Rose)\
**Post date:** [August 4, 2009, 2:48pm UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/1 "2009-08-04T14:48:11Z")

</div>

Hi,

I&nbsp;have&nbsp;a&nbsp;PosgreSQLFeatureLayer,&nbsp;when&nbsp;it&nbsp;loads&nbsp;data&nbsp;from&nbsp;the&nbsp;database,&nbsp;or&nbsp;when&nbsp;the&nbsp;map&nbsp;is&nbsp;zoomed&nbsp;in/out,&nbsp;it&nbsp;causes&nbsp;some&nbsp;errors&nbsp;in&nbsp;the&nbsp;database&nbsp;Log&nbsp;file:

could&nbsp;not&nbsp;receive&nbsp;data&nbsp;from&nbsp;client:Unknown&nbsp;winsock&nbsp;error&nbsp;10061

Unexpected&nbsp;EOF&nbsp;on&nbsp;client&nbsp;connection

I&nbsp;did&nbsp;not&nbsp;notice&nbsp;this&nbsp;before.&nbsp;By&nbsp;the&nbsp;way,&nbsp;I&nbsp;am&nbsp;using&nbsp;Windows&nbsp;Vista&nbsp;x64.

Thanks

Rose

&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 4, 2009, 9:12pm UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/2 "2009-08-04T21:12:18Z")

</div>

Rose,

Thanks&nbsp;for&nbsp;your&nbsp;post!  
&nbsp;  
This&nbsp;error&nbsp;may&nbsp;be&nbsp;some&nbsp;shared&nbsp;memory&nbsp;issue&nbsp;of&nbsp;the&nbsp;Postgre,&nbsp;and&nbsp;I&nbsp;found&nbsp;that&nbsp;some&nbsp;people&nbsp;have&nbsp;fixed&nbsp;this&nbsp;issue&nbsp;and&nbsp;produced&nbsp;a&nbsp;patch&nbsp;file.&nbsp;You&nbsp;can&nbsp;find&nbsp;the&nbsp;detail&nbsp;information&nbsp;in&nbsp;the&nbsp;following&nbsp;links:  
&nbsp;  
[archives.postgresql.org/pgsq...g00036.php](http://archives.postgresql.org/pgsql-bugs/2009-07/msg00036.php)  
&nbsp;  
Or  
&nbsp;  
[nabble.com/Unknown-winso...53660.html](http://www.nabble.com/Unknown-winsock-error-10061-td24353660.html)  
&nbsp;  
And&nbsp;you&nbsp;can&nbsp;get&nbsp;the&nbsp;patch&nbsp;file&nbsp;here:  
&nbsp;  
[uploads.enterprisedb.com/dow...35bdb665ee](http://uploads.enterprisedb.com/download.php?file=abb85b99acc1cf1668e3ff35bdb665ee)  
&nbsp;  
Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.  
&nbsp;  
Thanks,  
&nbsp;  
Sun

---

<div class="post-metadata">

**Author:** ![Rose](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rose](https://community.thinkgeo.com/u/Rose)\
**Post date:** [August 7, 2009, 10:12am UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/3 "2009-08-07T10:12:58Z")

</div>

Sun:

The&nbsp;link&nbsp;you&nbsp;mentioned&nbsp;to&nbsp;get&nbsp;the&nbsp;patch&nbsp;file&nbsp;is&nbsp;for&nbsp;EnterpriseDB&nbsp;Large&nbsp;File&nbsp;Uploader,&nbsp;I&nbsp;don't&nbsp;think&nbsp;that&nbsp;is&nbsp;the&nbsp;patch&nbsp;file&nbsp;for&nbsp;the&nbsp;issue&nbsp;I&nbsp;mentioned.&nbsp;Also&nbsp;I&nbsp;am&nbsp;still&nbsp;using&nbsp;PosgreSQL&nbsp;8.3,&nbsp;everything&nbsp;worked&nbsp;well&nbsp;before&nbsp;I&nbsp;upgraded&nbsp;to&nbsp;MapSuite&nbsp;3.1.182.

Thanks

Rose

# &nbsp;
  

&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 10, 2009, 4:03am UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/4 "2009-08-10T04:03:46Z")

</div>

Rose,

I&nbsp;am&nbsp;wondering&nbsp;which&nbsp;product&nbsp;you&nbsp;are&nbsp;using,&nbsp;MapSuite&nbsp;Service&nbsp;Edition&nbsp;or&nbsp;MapSuite&nbsp;Desktop&nbsp;Edition?&nbsp;

And&nbsp;can&nbsp;you&nbsp;specify&nbsp;the&nbsp;versions&nbsp;in&nbsp;more&nbsp;detail&nbsp;which&nbsp;version&nbsp;you&nbsp;are&nbsp;upgraded&nbsp;from?&nbsp;And&nbsp;which&nbsp;version&nbsp;is&nbsp;now&nbsp;you&nbsp;are&nbsp;using&nbsp;(if&nbsp;you&nbsp;are&nbsp;using&nbsp;Desktop&nbsp;Edition,&nbsp;you&nbsp;have&nbsp;to&nbsp;let&nbsp;us&nbsp;know&nbsp;which&nbsp;version&nbsp;for&nbsp;Desktop&nbsp;too)?

Sorry&nbsp;for&nbsp;the&nbsp;inconvenience.

Any&nbsp;more&nbsp;questions&nbsp;let&nbsp;me&nbsp;know.

Thanks.

Sun

---

<div class="post-metadata">

**Author:** ![Rose](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rose](https://community.thinkgeo.com/u/Rose)\
**Post date:** [August 10, 2009, 9:33am UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/5 "2009-08-10T09:33:37Z")

</div>

Sun:

I&nbsp;am&nbsp;using&nbsp;MapSuite&nbsp;Desktop&nbsp;3.0.362&nbsp;RC,&nbsp;PostgreSQL&nbsp;8.3.

Thanks

Rose

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 11, 2009, 1:27am UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/6 "2009-08-11T01:27:21Z")

</div>

Hi&nbsp;Rose,

We&nbsp;have&nbsp;recreated&nbsp;this&nbsp;error&nbsp;and&nbsp;found&nbsp;that&nbsp;this&nbsp;is&nbsp;really&nbsp;a&nbsp;bug&nbsp;in&nbsp;postgre&nbsp;extension&nbsp;of&nbsp;the&nbsp;latest&nbsp;public&nbsp;release&nbsp;version&nbsp;(3.0.362).&nbsp;This&nbsp;problem&nbsp;has&nbsp;been&nbsp;fixed&nbsp;and&nbsp;it&nbsp;will&nbsp;not&nbsp;exist&nbsp;in&nbsp;the&nbsp;next&nbsp;version.  
&nbsp;  
Thank&nbsp;you&nbsp;for&nbsp;reporting&nbsp;this&nbsp;problem,&nbsp;and&nbsp;any&nbsp;more&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.  
&nbsp;  
sun

---

<div class="post-metadata">

**Author:** ![Rose](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rose](https://community.thinkgeo.com/u/Rose)\
**Post date:** [August 11, 2009, 7:54am UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/7 "2009-08-11T07:54:59Z")

</div>

Sun:

Can&nbsp;I&nbsp;get&nbsp;the&nbsp;intrim&nbsp;build&nbsp;with&nbsp;the&nbsp;bug&nbsp;fixed?&nbsp;I&nbsp;can't&nbsp;wait&nbsp;until&nbsp;next&nbsp;release,&nbsp;my&nbsp;project&nbsp;has&nbsp;been&nbsp;overdue.

Thanks

Rose

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 11, 2009, 7:56pm UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/8 "2009-08-11T19:56:20Z")

</div>

Rose,&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;will&nbsp;try&nbsp;to&nbsp;send&nbsp;you&nbsp;a&nbsp;temporary&nbsp;version&nbsp;as&nbsp;soon&nbsp;as&nbsp;possible&nbsp;(3.0.382).&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![Rose](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rose](https://community.thinkgeo.com/u/Rose)\
**Post date:** [August 24, 2009, 10:49am UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/9 "2009-08-24T10:49:28Z")

</div>

Hi,

With&nbsp;the&nbsp;build&nbsp;of&nbsp;3.0.382,&nbsp;I&nbsp;still&nbsp;can&nbsp;see&nbsp;the&nbsp;same&nbsp;errors&nbsp;in&nbsp;the&nbsp;Database&nbsp;Log&nbsp;file&nbsp;when&nbsp;the&nbsp;Npgsql.NpgsqlConnection&nbsp;is&nbsp;closed.

&nbsp;

Thanks

Rose

&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 25, 2009, 12:40am UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/10 "2009-08-25T00:40:14Z")

</div>

Hi&nbsp;Rose,

Do&nbsp;you&nbsp;create&nbsp;and&nbsp;close&nbsp;the&nbsp;Npgsql.NpgsqlConnection&nbsp;manually&nbsp;like&nbsp;this?&nbsp;  
&nbsp;  
`NpgsqlConnection connection = new NpgsqlConnection(connectString);postgreLayer = new PostgreSqlFeatureLayer(connection, "rail", "oid");`  
&nbsp;  
Could&nbsp;you&nbsp;please&nbsp;supply&nbsp;some&nbsp;sample&nbsp;code&nbsp;here&nbsp;so&nbsp;that&nbsp;I&nbsp;can&nbsp;recreate&nbsp;this&nbsp;error&nbsp;in&nbsp;my&nbsp;machine?&nbsp;I&nbsp;can&nbsp;not&nbsp;see&nbsp;this&nbsp;error&nbsp;log&nbsp;message&nbsp;until&nbsp;my&nbsp;application&nbsp;is&nbsp;closed.  
&nbsp;  
Thanks,  
&nbsp;  
sun

---

<div class="post-metadata">

**Author:** ![Rose](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rose](https://community.thinkgeo.com/u/Rose)\
**Post date:** [August 25, 2009, 3:19pm UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/11 "2009-08-25T15:19:42Z")

</div>

Hi,&nbsp;Sun:

Here&nbsp;is&nbsp;the&nbsp;code&nbsp;snippet,&nbsp;you&nbsp;don't&nbsp;need&nbsp;to&nbsp;load&nbsp;the&nbsp;map,&nbsp;just&nbsp;create&nbsp;the&nbsp;connection&nbsp;and&nbsp;close&nbsp;it

When&nbsp;the&nbsp;form&nbsp;is&nbsp;loaded:&nbsp;

`dbconn = New Npgsql.NpgsqlConnection(connectString) `

When&nbsp;the&nbsp;form&nbsp;is&nbsp;closed:&nbsp;

`dbconn.close `

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 25, 2009, 8:56pm UTC](https://community.thinkgeo.com/t/postgresqlfeaturelayer-causes-log-error-in-database-log-file/584/12 "2009-08-25T20:56:08Z")

</div>

Rose,

This&nbsp;log&nbsp;message&nbsp;is&nbsp;generated&nbsp;because&nbsp;Npgsql&nbsp;is&nbsp;using&nbsp;pool.&nbsp;When&nbsp;your&nbsp;application&nbsp;finishes,&nbsp;.NET&nbsp;shuts&nbsp;down&nbsp;the&nbsp;TCP&nbsp;connections&nbsp;and&nbsp;postgresql&nbsp;logs&nbsp;that.  
&nbsp;  
I&nbsp;think&nbsp;this&nbsp;is&nbsp;harmless,&nbsp;and&nbsp;you&nbsp;can&nbsp;get&nbsp;ride&nbsp;of&nbsp;this&nbsp;message&nbsp;by&nbsp;turning&nbsp;off&nbsp;the&nbsp;connection&nbsp;pool&nbsp;with&nbsp;pooling=false&nbsp;in&nbsp;your&nbsp;connection&nbsp;string.&nbsp;So&nbsp;the&nbsp;connection&nbsp;string&nbsp;could&nbsp;be&nbsp;like&nbsp;this:  
&nbsp;  
`string connectString = "Server=192.168.0.210;User Id=yourid;Password=password;DataBase=postgis;pooling=false;";`  
&nbsp;  
Or&nbsp;you&nbsp;can&nbsp;clear&nbsp;the&nbsp;connection&nbsp;pool&nbsp;manually&nbsp;when&nbsp;your&nbsp;application&nbsp;finishes.&nbsp;For&nbsp;example,&nbsp;you&nbsp;can&nbsp;do&nbsp;this&nbsp;in&nbsp;the&nbsp;FormClosing&nbsp;event:  
&nbsp;  
`void Form1_FormClosing(object sender, FormClosingEventArgs e){    connection.ClearPool();}`  
&nbsp;  
And&nbsp;you&nbsp;can&nbsp;get&nbsp;more&nbsp;information&nbsp;about&nbsp;this&nbsp;here:  
[pgfoundry.org/forum/forum.ph...rum\_id=519](http://pgfoundry.org/forum/forum.php?thread_id=1267&forum_id=519)  
&nbsp;  
and&nbsp;here:  
[pgfoundry.org/forum/forum.ph...rum\_id=519](http://pgfoundry.org/forum/forum.php?thread_id=2122&forum_id=519)  
&nbsp;  
Hope&nbsp;this&nbsp;can&nbsp;help&nbsp;you,&nbsp;and&nbsp;any&nbsp;more&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.  
&nbsp;  
Thanks,  
&nbsp;  
sun
