Skip site navigation (1) Skip section navigation (2)

Re: postgres crash on CURSORS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres crash on CURSORS
Date: 2000-04-05 15:04:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> Current abort check seems too late.
> For example,is the following behavior preferable ?

> =# begin;
> =# aaa;
> ERROR:  parser: parse error at or near "aaa"
> =# select * from aaaa;
> ERROR:  Relation 'aaaa' does not exist
> 	?? existence check ?? Why ??

> reindex=# select * from t; -- t is a existent table
> NOTICE:  (transaction aborted): queries ignored until END

Hmm.  The error of course appears because we perform parsing and
rewriting before checking for abort. I am not sure whether the rewriter
can introduce begin/commit commands at present, but I would not like to
design the front-end processing on the assumption that it can never do so.
So I think we have to run the query that far before we think about

>> If we are in abort state and
>> the submitted query string is
>> it seems to me that the correct response is to reject the first select
>> and process the second.  The currently committed code does so, but
>> your patch would fail.

> It seems pg_parse_and_plan() returns NIL plan_list and NIL
> querytree_list in this case.

You're not looking at current CVS ;-)

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Kovacs Zoltan SandorDate: 2000-04-05 15:17:46
Subject: Re: refint doesn't work well with BDE
Previous:From: Bruce MomjianDate: 2000-04-05 14:46:50
Subject: Re: AIX and gcc (was: bug in nabstime.c)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group