Re: Out of memory with ODBC

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Relyea, Mike" <Mike(dot)Relyea(at)xerox(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Out of memory with ODBC
Date: 2007-10-12 18:50:13
Message-ID: 470FC1E5.3050702@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Relyea, Mike wrote:
>> From: Richard Huxton [mailto:dev(at)archonet(dot)com]
>>
>> Do you see a backend process growing to 2GB+ before failure?
>
> I'm running PG 8.2.4 on WinXP. I used the task manager (as a quick and
> dirty utility) to watch the memory usage of the backend and it seemed to
> peak around 1.2GB. My server only has 1.5GB installed memory, so that
> would seem to verify that the process does indeed run out of memory.

Yep

>> Can you reproduce this immediately (connect, query, crash),
>> or does the system have to run for a while first?
>
> I rebooted my server (thankfully I don't have very many clients at all,
> so that helps) and before anybody else connected to it, ran the query
> and observed the same result.
>
> This seems to be a problem with the ODBC driver? How can I narrow that
> down further?

Well, first make 100% certain the query being executed is the one you
see being sent from Access.

If so, the next obvious thing would be to set up an empty database with
the same structure as your live one and try the query on that. If *that*
crashes too then you can rule out any data processing problems.

It will also let you turn statement logging on in that database (ALTER
DATABASE SET ...) and capture everything the ODBC driver sends. There
might be something that leaps out at you. Take all of those statements
and put them into a text-file and run them using psql -f <file>. That
should cause the same crash.

If it does, it means you have a self-contained test-case that someone
else can look at for you. We can also test it on Linux/BSD etc.

Then, if you still can't see where the problem is, replace the ODBC
driver with a different (in your case older) version and see if you
still get the problem. Might be worth going back a few versions too, to
see if this is something introduced recently.

http://www.postgresql.org/ftp/odbc/versions/msi/

Another option would be to try the odbc-ng project from Command Prompt
and see if that does the same thing. I believe that's a completely
separate code-base.

https://projects.commandprompt.com/public/odbcng/wiki/Downloads

Remember, *something* in the sequence of commands that get executed from
Access must be different than when you execute them through pgAdmin.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-10-12 18:51:21 Re: Detailed logging, but only for one user?
Previous Message Michael Nolan 2007-10-12 18:18:33 Detailed logging, but only for one user?