Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.8.8/8.7.5) with ESMTP id QAA22909; Thu, 23 Jul 1998 16:14:58 -0400 (EDT) Received: (from maillist@localhost) by candle.pha.pa.us (8.8.5/8.8.5) id PAA13730; Thu, 23 Jul 1998 15:45:04 -0400 (EDT) From: Bruce Momjian Message-Id: <199807231945.PAA13730@candle.pha.pa.us> Subject: Re: [HACKERS] ODBC and palloc ... In-Reply-To: <35B77342.6558C42B@insightdist.com> from Byron Nikolaidis at "Jul 23, 1998 1:30:42 pm" To: byronn@insightdist.com (Byron Nikolaidis) Date: Thu, 23 Jul 1998 15:45:04 -0400 (EDT) Cc: dlibenzi@maticad.it, pgsql-hackers@postgreSQL.org, pgsql-interfaces@postgreSQL.org, daveh@insightdist.com X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Davide Libenzi wrote: > > > > After a lot of changes I've compiled,linked and tested (regression) my > > PostgreSQL installation no HPUX 9.*. > > > > I've also built and installed the ODBC driver and I get Ms Access error > > which the PostgresSQL server log in "palloc failure : memory exausted". > > > > Is this a server bug or ODBC driver bug ? > > > > I am assuming you have a fairly new odbc driver (6.30.0248 is the > latest) and not the old postodbc. BTW, on our website > (www.insightdist.com/psqlodbc) we have the DLL and a full install EXE > for win32 so you wouldn't have to build it yourself from the source code > if you didn't want to. > > The palloc failure usually occurs because Access uses the multiple OR > query (select ... where a=1 OR a=2 OR a=3...) to access the recordset. > The backend does not handle this very well and it is already well known > on the TODO list. > > There are several possibilities to get past this: > 1. Use a non-updateable table (by setting the driver readonly option, or > by not specifying any unique identifiers). > 2. For a query, use a snapshot recordset in the query properties. > 3. Show the OID column in the drivers advanced datasource options and > use that alone to index on. You should create an index on it too. This > is still slow, but at least shouldn't crash. > > Other possibilities: > > In house, Dave made a patch to postgres which rewrites the multiple OR > query into a UNION query, which works great and its fast! We may make > this patch available evntually on our website. I am thinking about this right now, and will post an analysis within the next day. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)