PostgreSQL arrays get corrupted after a while

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
hbus
Posts: 1
Joined: Thu 03 Mar 2011 14:55

PostgreSQL arrays get corrupted after a while

Post by hbus » Wed 31 Aug 2011 08:46

We have recently changed to use protocol=3 and are experiencing some fatal issues.

We have an aggregation process running that performs a lot of queries (and some updates) for hours. After a while - often between one and two minutes - we are having issues with columns that are returned from PostgreSQL as arrays. The driver never seems to recover and will afterwards always produce incorrect array columns.

We are using DataTables and are relying on the driver's ability to convert the PostgreSQL array to a string in the format of "{abc,def}". That has been working great for a long time using protocol=2.

The string we get when it gets corrupted is such as: "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\rabc\0\0\0\rabc"

However, restarting the application and running the same query again produces the correct result.

I have been trying hard to find a way to reproduce the issue without our huge dataset but have so far been unable to do that.

We are experiencing the issue using PostgreSQL 9.0.4 on both Windows and Linux and with both the 4.95.190 and 5.30.202 driver versions.

Any ideas on how to gather additional details from the driver on this issue?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 08 Sep 2011 12:18

Unfortunately, we cannot reproduce the issue in our environment. If possible, please localize the problem and send us a small test project with the corresponding DDL/DML script. Does the workaround with using Protocol 2 work?
Sorry for the late reply.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 09 Sep 2011 08:41

If you are unable to reproduce the issue in a separate small test project, please give us the following information:
1) which data tables are you using (System.Data.DataTable or Devart.Data.PostgreSql.PgSqlDataTable)? Tell us the way you fill your datatable (code snippet);
2) the exact data type of the column in the database;
3) do all record of the corresponding column in data table have the incorrect values when the problem persists? Or only particular records?
4) tell us your value of Devart.Data.PostgreSql.PgSqlDataTable.ReturnProviderSpecificTypes.

Post Reply