Search found 74 matches

by TonyV
Wed 25 Jul 2012 14:14
Forum: dotConnect for PostgreSQL
Topic: Support for PostgreSQL SIMILAR TO command?
Replies: 10
Views: 1493

Re: Support for PostgreSQL SIMILAR TO command?

It's not registered to my name, it's registered to my boss. I'll get the information and and email it.
by TonyV
Wed 25 Jul 2012 13:03
Forum: dotConnect for PostgreSQL
Topic: Does PgSqlLoader time out?
Replies: 1
Views: 1027

Does PgSqlLoader time out?

We've recently made some changes to our code that are intended to speed up our loading of data. It's a complicated process involving transmission of data over the wire using XMPP from our server software to the machine where Postgres is installed. This process was taking a minimum of 4.5 hours + to download 2.5 million rows of data, often taking longer. This is much too long. Also, the disk ended up being so busy that the machine was totally unusable while the download was happening.

We started using PgSqlLoader to make use of the COPY command and this has reduced the download time and disk activity on the machine. While disk activity is still somewhat high, the machine is now usable.

We've been seeing some timeout error occurring in our code during the download process. We've set the timeout value to 0 everywhere there was one, however, there is no time out setting in the PgSqlLoader class. I suspect that the timeout errors are coming from this class.

Is there any way that we can set a time out on the COPY operation?

Tony
by TonyV
Mon 23 Jul 2012 12:37
Forum: dotConnect for PostgreSQL
Topic: Support for PostgreSQL SIMILAR TO command?
Replies: 10
Views: 1493

Re: Support for PostgreSQL SIMILAR TO command?

When I log into the Registered Users area, I do not see a link to download version 6.x. I see a link for version 5.80.350 and for DbMonitor 3.00.3.

Why don't I see a link for the latest version?
by TonyV
Fri 06 Jul 2012 15:11
Forum: dotConnect for PostgreSQL
Topic: Support for PostgreSQL SIMILAR TO command?
Replies: 10
Views: 1493

Re: Support for PostgreSQL SIMILAR TO command?

Thank you very much! Do you have an estimate for when this will go out?
by TonyV
Sat 23 Jun 2012 02:07
Forum: dotConnect for PostgreSQL
Topic: What is the exact exception and message that is thrown if a query times out?
Replies: 2
Views: 1248

What is the exact exception and message that is thrown if a query times out?

I haven't actually looked at this error too often, but I believe I need to trap this condition in one particular query in my application. We are expecting our software to be installed on some slow syistems with only 500 MB of RAM. I'm expecting that this one particular query is going to time out a lot and I need to handle the condition properly. Unfortunately, my workstation has 4 GB and 2 cores and is clocked at almost 3 GHz.

SO what exactly do I need to catch and how do I know for sure that it's a timeout exception?

BTW, the query is generated using an Entity Framework 4.0 context developed using Entity Developer. We're using build 5.80.350.0.

Tony
by TonyV
Thu 07 Jun 2012 17:54
Forum: dotConnect for PostgreSQL
Topic: Support for PostgreSQL SIMILAR TO command?
Replies: 10
Views: 1493

Support for PostgreSQL SIMILAR TO command?

My program has a search page on it in which I want the users to be able to specify search strings that can contain %, _, [, and ] characters. In PostgreSQL, the LIKE command does not support [ & ], but the SIMILAR TO command does.

Is there any way I can get a search that uses the SIMILAR TO command in my entity framework query?

Tony
by TonyV
Wed 30 May 2012 12:34
Forum: dotConnect for PostgreSQL
Topic: Does Entity Developer support array parameters to stored fun
Replies: 4
Views: 3685

Re: Does Entity Developer support array parameters to stored

Thank you very much! I believe we can make this work. I can probably call the stored function through the context's ExeciteStoreCommand method, so I won't have to create the PgSqlConnection and PgSqlCommand objects.

Tony
by TonyV
Tue 29 May 2012 12:41
Forum: dotConnect for PostgreSQL
Topic: Does Entity Developer support array parameters to stored fun
Replies: 4
Views: 3685

Re: Does Entity Developer support array parameters to stored

Thank you for getting back to me so promptly.

Would I be able to call the stored function through PgSqlCommand? Is there a way I can pass an array as a parameter to the stored function using PgSqlCommand? Something like

Code: Select all

Guid[] ids = new Guid[] { . . . };
using ( PgSqlCommand cmd = new PgSqlCommand( "SELECT function( ids );" ) {
    cmd.Parameters.AddWithValue( "ids", ids );

    PgSqlReader reader = cmd.ExecuteReader();
    while ( reader.Read() ) {
        ... 
    }
}
Thanks

Tony
by TonyV
Fri 25 May 2012 22:15
Forum: dotConnect for PostgreSQL
Topic: Does Entity Developer support array parameters to stored fun
Replies: 4
Views: 3685

Does Entity Developer support array parameters to stored fun

I have written a couple of stored functions in my database that take a UUID and an array of UUIDs as parameters. They compile fine in PostgreSQL.

When I try to update my database model in Entity Developer and include these functions in the model, I get the error:

Code: Select all

The Type ARRAY is not qualified with a namespace or alias. Only PrimitiveTypes can be used without qualification.
How do I fix the model to get rid of the error?

Here is the code for one of the functions:

Code: Select all

CREATE OR REPLACE FUNCTION security.SynchRolesForGroup(grpid uuid, roleids uuid[]) RETURNS void AS
$BODY$
DECLARE
    RoleId      UUID;
BEGIN
    DELETE FROM security.aspnetx_RolesInGroups WHERE GroupId = GrpId;

    -- Now loop over all of the UUIDs in the RoleIds parameter
    FOREACH RoleId IN ARRAY RoleIds LOOP
        INSERT INTO security.aspnetx_RolesInGroups
            ( GroupId, RoleId )
        VALUES
            ( GrpId, RoleId );
    END LOOP;
END;
$BODY$
  LANGUAGE plpgsql;
Tony
by TonyV
Mon 30 Apr 2012 18:39
Forum: dotConnect for PostgreSQL
Topic: Setting ReadTimeout in PgSqlLargeObject throwing exception
Replies: 3
Views: 1205

Re: Setting ReadTimeout in PgSqlLargeObject throwing excepti

Not sure if you guys missed this one as there have been no responses in a week . . .
by TonyV
Mon 30 Apr 2012 18:36
Forum: dotConnect for PostgreSQL
Topic: What is the cause of the "Stream already closed" message?
Replies: 17
Views: 3857

Re: What is the cause of the "Stream already closed" message

Thank you! This has made a huge difference in our application. We also made some changes to Auto Vacuum settings which has also helped. We have more tuning to do.

Tony
by TonyV
Tue 24 Apr 2012 13:48
Forum: dotConnect for PostgreSQL
Topic: What is the cause of the "Stream already closed" message?
Replies: 17
Views: 3857

That will be just fine, thank you very much!
by TonyV
Mon 23 Apr 2012 16:00
Forum: dotConnect for PostgreSQL
Topic: Setting ReadTimeout in PgSqlLargeObject throwing exception
Replies: 3
Views: 1205

Setting ReadTimeout in PgSqlLargeObject throwing exception

I've got the following code in a class in my application:

Code: Select all

public static int PutImageBytes( CarSystemEntities context, byte[] image ) {
    PgSqlConnection connection = ( (EntityConnection) context.Connection ).StoreConnection as PgSqlConnection;

    try {
        if ( connection.State != ConnectionState.Open ) {
            connection.Open();
        }

        PgSqlLargeObject lo = new PgSqlLargeObject( connection );
        lo.ReadTimeout = 0;
        lo.WriteTimeout = 0;

        lo.Create();
        lo.Open();
        lo.Write( image, 0, image.Length );
                lo.Close();

        return lo.Oid;
    } catch ( Exception ex ) {
        throw new DataAccessException( DataAccessOperations.PutImageBytes, FailureReason.DatabaseError, ex );
    }
}
This throws a "System.InvalidOperationException: Timeouts are not supported on this stream" exception on the lo.ReadTimeout = 0 line.

We are trying to keep the Large Object table operation from timing out as this seems to create the invalid connections we have been discussing in my other thread called "What is the cause of the Stream Already Closed" message?

It appears that the ReadTimeout and WriteTimeout properties mentioned in the documentation do not work and have nothing to do with setting the timeout used internally by any commands involved in retrieving data from or writing data to the large objects table. What is the correct way to keep large object operations from timing out?

Tony
by TonyV
Wed 18 Apr 2012 12:32
Forum: dotConnect for PostgreSQL
Topic: What is the cause of the "Stream already closed" message?
Replies: 17
Views: 3857

Thank you! We look forward to hearing of the release.

Do you know what version of the software this bug was introduced in?

Will you be able to release the software sometime soon? Is there any way we can get a prerelease version to test the fix? We are hitting a hard deadline of a code freeze on May 15 and we have to have this fixed before that date.

Thanks

Tony