Received: from wwwserver.maticad.it (maticad.it [195.18.2.43]) by hub.org (8.8.8/8.7.5) with ESMTP id OAA03223; Thu, 23 Jul 1998 14:11:41 -0400 (EDT) Received: from pcdavide ([195.18.3.25]) by wwwserver.maticad.it (Post.Office MTA v3.1.2 release (PO205-101c) **** normal license ****) with SMTP id AAA64; Thu, 23 Jul 1998 20:10:14 +0200 Message-ID: <001001bdb66d$67aa33a0$1f0104c0@pcdavide> From: dlibenzi@maticad.it (Davide Libenzi) To: "Byron Nikolaidis" , "Davide Libenzi" Cc: , , "David Hartwig" Subject: Re: [HACKERS] ODBC and palloc ... Date: Thu, 23 Jul 1998 20:09:21 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000D_01BDB675.C8048450" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 This is a multi-part message in MIME format. ------=_NextPart_000_000D_01BDB675.C8048450 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I think this is not my case. See attachment log for details. Hi ---- Davide Libenzi at : Maticad s.r.l. Via Della Giustizia n.9 Fano (PS) 61032 Italy Tel.: +39-721-808308 (ra) Fax: +39-721-808309 Email: WWW: -----Original Message----- From: Byron Nikolaidis To: Davide Libenzi Cc: pgsql-hackers@postgreSQL.org ; pgsql-interfaces@postgreSQL.org ; David Hartwig Date: Thursday, July 23, 1998 6:59 PM Subject: Re: [HACKERS] ODBC and palloc ... >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. > >Byron > ------=_NextPart_000_000D_01BDB675.C8048450 Content-Type: text/plain; name="psqlodbc.log" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="psqlodbc.log" conn=3D155525648, SQLDriverConnect( in)=3D'DSN=3DAAAAA;', = fDriverCompletion=3D1 DSN info: = DSN=3D'AAAAA',server=3D'salvia',port=3D'5432',dbase=3D'prova',user=3D'pos= tgres',passwd=3D'' = readonly=3D'0',protocol=3D'',showoid=3D'0',fakeoidindex=3D'0',showsystabl= e=3D'0' conn_settings=3D'' translation_dll=3D'',translation_option=3D'' conn=3D155525648, = SQLDriverConnect(out)=3D'DSN=3DAAAAA;DATABASE=3Dprova;SERVER=3Dsalvia;POR= T=3D5432;UID=3Dpostgres;PWD=3D;READONLY=3D0;PROTOCOL=3D;FAKEOIDINDEX=3D0;= SHOWOIDCOLUMN=3D0;ROWVERSIONING=3D0;SHOWSYSTEMTABLES=3D0;CONNSETTINGS=3D'= Global Options: fetch=3D100, socket=3D4096, unknown_sizes=3D2, = max_varchar_size=3D254, max_longvarchar_size=3D4094 disable_optimizer=3D1, unique_index=3D0, = use_declarefetch=3D1 text_as_longvarchar=3D1, unknowns_as_longvarchar=3D0, = bools_as_char=3D1 extra_systable_prefixes=3D'dd_;', conn_settings=3D'' conn=3D155525648, query=3D' ' conn=3D155525648, query=3D'BEGIN' conn=3D155525648, query=3D'set DateStyle to 'ISO'; set geqo to 'OFF'' Command response: 'SET VARIABLE' conn=3D155525648, query=3D'declare SQL_CUR160038976 cursor for select = oid from pg_type where typname=3D'lo'' conn=3D155525648, query=3D'fetch 100 in SQL_CUR160038976' [ fetched 0 rows ] conn=3D155525648, query=3D'close SQL_CUR160038976' conn=3D155525648, query=3D'END' conn=3D155525648, query=3D'BEGIN' conn=3D155525648, query=3D'declare SQL_CUR160038976 cursor for SELECT = Config, nValue FROM MSysConf' ERROR from backend during send_query: 'ERROR: msysconf: Table does not = exist.' conn=3D155525648, query=3D'ABORT' STATEMENT ERROR: func=3DSC_execute, desc=3D'', errnum=3D1, = errmsg=3D'Error while executing the query' = ------------------------------------------------------------ hdbc=3D155525648, stmt=3D160038976, result=3D0 manual_result=3D0, prepare=3D0, internal=3D0 bindings=3D0, bindings_allocated=3D0 parameters=3D0, parameters_allocated=3D0 statement_type=3D0, statement=3D'SELECT Config, nValue = FROM MSysConf' stmt_with_params=3D'declare SQL_CUR160038976 cursor for = SELECT Config, nValue FROM MSysConf' data_at_exec=3D-1, current_exec_param=3D-1, = put_data=3D0 currTuple=3D-1, current_col=3D-1, lobj_fd=3D-1 maxRows=3D0, rowset_size=3D1, keyset_size=3D0, = cursor_type=3D0, scroll_concurrency=3D1 cursor_name=3D'SQL_CUR160038976' ----------------QResult Info = ------------------------------- CONN ERROR: func=3DSC_execute, desc=3D'', errnum=3D10, errmsg=3D'ERROR: = msysconf: Table does not exist.' ------------------------------------------------------------ henv=3D155518528, conn=3D155525648, status=3D1, = num_stmts=3D16 sock=3D155518544, stmts=3D155518592, lobj_type=3D-999 ---------------- Socket Info ------------------------------- socket=3D340, reverse=3D0, errornumber=3D0, = errormsg=3D'(null)' buffer_in=3D155531944, buffer_out=3D155536048 buffer_filled_in=3D2, buffer_filled_out=3D0, = buffer_read_in=3D2 conn=3D155525648, query=3D'BEGIN' conn=3D155525648, query=3D'declare SQL_CUR160104664 cursor for select = relname, usename, relhasrules from pg_class, pg_user where relkind =3D = 'r' and relname !~ '^xinv[0-9]+' and int4out(usesysid) =3D = int4out(relowner) order by relname' conn=3D155525648, query=3D'fetch 100 in SQL_CUR160104664' [ fetched 28 rows ] conn=3D155525648, query=3D'close SQL_CUR160104664' conn=3D155525648, query=3D'END' conn=3D155525648, query=3D'BEGIN' conn=3D155525648, query=3D'declare SQL_CUR160173568 cursor for select = u.usename, c.relname, a.attname, a.atttypid,t.typname, a.attnum, = a.attlen, a.atttypmod, a.attnotnull from pg_user u, pg_class c, = pg_attribute a, pg_type t where int4out(u.usesysid) =3D = int4out(c.relowner) and c.oid=3D a.attrelid and a.atttypid =3D t.oid and = (a.attnum > 0) and c.relname like 'distinta' order by attnum' conn=3D155525648, query=3D'fetch 100 in SQL_CUR160173568' [ fetched 3 rows ] conn=3D155525648, query=3D'close SQL_CUR160173568' conn=3D155525648, query=3D'END' conn=3D155525648, query=3D'BEGIN' conn=3D155525648, query=3D'declare SQL_CUR160239776 cursor for select = u.usename, c.relname, a.attname, a.atttypid,t.typname, a.attnum, = a.attlen, a.atttypmod, a.attnotnull from pg_user u, pg_class c, = pg_attribute a, pg_type t where int4out(u.usesysid) =3D = int4out(c.relowner) and c.oid=3D a.attrelid and a.atttypid =3D t.oid and = (a.attnum > 0) and c.relname like 'distinta' order by attnum' conn=3D155525648, query=3D'fetch 100 in SQL_CUR160239776' [ fetched 3 rows ] conn=3D155525648, query=3D'close SQL_CUR160239776' conn=3D155525648, query=3D'END' conn=3D155525648, query=3D'BEGIN' conn=3D155525648, query=3D'declare SQL_CUR160174088 cursor for select = c.relname, i.indkey, i.indisunique, i.indisclustered from pg_index i, = pg_class c, pg_class d where c.oid =3D i.indexrelid and d.relname =3D = 'distinta' and d.oid =3D i.indrelid' conn=3D155525648, query=3D'fetch 100 in SQL_CUR160174088' [ fetched 1 rows ] conn=3D155525648, query=3D'close SQL_CUR160174088' conn=3D155525648, query=3D'END' conn=3D155525648, query=3D'BEGIN' conn=3D155525648, query=3D'declare SQL_CUR160038976 cursor for SELECT = "distinta"."padre","distinta"."figlio" FROM "distinta" ' conn=3D155525648, query=3D'fetch 100 in SQL_CUR160038976' [ fetched 3 rows ] conn=3D155525648, query=3D'close SQL_CUR160038976' conn=3D155525648, query=3D'END' conn=3D155525648, query=3D'BEGIN' conn=3D155525648, query=3D'declare SQL_CUR160038976 cursor for SELECT = "padre","figlio","qta" FROM "distinta" WHERE "padre" =3D 'PPPA = ' AND "figlio" =3D 'AAA ' = OR "padre" =3D 'KKKL ' AND "figlio" =3D 'LLLA = ' OR "padre" =3D 'AAAAA = ' AND "figlio" =3D 'ASDWDWD ' OR "padre" =3D = 'AAAAA ' AND "figlio" =3D 'ASDWDWD = ' OR "padre" =3D 'AAAAA ' AND = "figlio" =3D 'ASDWDWD ' OR "padre" =3D 'AAAAA = ' AND "figlio" =3D 'ASDWDWD = ' OR "padre" =3D 'AAAAA ' AND "figlio" =3D = 'ASDWDWD ' OR "padre" =3D 'AAAAA = ' AND "figlio" =3D 'ASDWDWD ' OR = "padre" =3D 'AAAAA ' AND "figlio" =3D 'ASDWDWD = ' OR "padre" =3D 'AAAAA = ' AND "figlio" =3D 'ASDWDWD '' ERROR from backend during send_query: 'FATAL 1: palloc failure: memory = exhausted' STATEMENT ERROR: func=3DSC_execute, desc=3D'', errnum=3D1, = errmsg=3D'Error while executing the query' = ------------------------------------------------------------ hdbc=3D155525648, stmt=3D160038976, result=3D0 manual_result=3D0, prepare=3D1, internal=3D0 bindings=3D0, bindings_allocated=3D0 parameters=3D160169992, parameters_allocated=3D20 statement_type=3D0, statement=3D'SELECT = "padre","figlio","qta" FROM "distinta" WHERE "padre" =3D ? AND = "figlio" =3D ? OR "padre" =3D ? AND "figlio" =3D ? OR "padre" =3D ? AND = "figlio" =3D ? OR "padre" =3D ? AND "figlio" =3D ? OR "padre" =3D ? AND = "figlio" =3D ? OR "padre" =3D ? AND "figlio" =3D ? OR "padre" =3D ? AND = "figlio" =3D ? OR "padre" =3D ? AND "figlio" =3D ? OR "padre" =3D ? AND = "figlio" =3D ? OR "padre" =3D ? AND "figlio" =3D ?' stmt_with_params=3D'declare SQL_CUR160038976 cursor for = SELECT "padre","figlio","qta" FROM "distinta" WHERE "padre" =3D 'PPPA = ' AND "figlio" =3D 'AAA = ' OR "padre" =3D 'KKKL ' AND "figlio" = =3D 'LLLA ' OR "padre" =3D 'AAAAA = ' AND "figlio" =3D 'ASDWDWD ' OR = "padre" =3D 'AAAAA ' AND "figlio" =3D 'ASDWDWD = ' OR "padre" =3D 'AAAAA = ' AND "figlio" =3D 'ASDWDWD ' OR "padre" =3D = 'AAAAA ' AND "figlio" =3D 'ASDWDWD = ' OR "padre" =3D 'AAAAA ' AND = "figlio" =3D 'ASDWDWD ' OR "padre" =3D 'AAAAA = ' AND "figlio" =3D 'ASDWDWD = ' OR "padre" =3D 'AAAAA ' AND "figlio" =3D = 'ASDWDWD ' OR "padre" =3D 'AAAAA = ' AND "figlio" =3D 'ASDWDWD '' data_at_exec=3D-1, current_exec_param=3D-1, = put_data=3D0 currTuple=3D-1, current_col=3D-1, lobj_fd=3D-1 maxRows=3D0, rowset_size=3D1, keyset_size=3D0, = cursor_type=3D0, scroll_concurrency=3D1 cursor_name=3D'SQL_CUR160038976' ----------------QResult Info = ------------------------------- CONN ERROR: func=3DSC_execute, desc=3D'', errnum=3D8, errmsg=3D'FATAL 1: = palloc failure: memory exhausted' ------------------------------------------------------------ henv=3D155518528, conn=3D155525648, status=3D1, = num_stmts=3D16 sock=3D155518544, stmts=3D155518592, lobj_type=3D-999 ---------------- Socket Info ------------------------------- socket=3D340, reverse=3D0, errornumber=3D0, = errormsg=3D'(null)' buffer_in=3D155531944, buffer_out=3D155536048 buffer_filled_in=3D45, buffer_filled_out=3D0, = buffer_read_in=3D45 conn=3D155525648, SQLDisconnect ------=_NextPart_000_000D_01BDB675.C8048450--