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: 17748.954947053@sss.pgh.pa.us (view raw or flat)
Thread:
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;
> 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
> *ABORT STATE*

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
aborting.

>> If we are in abort state and
>> the submitted query string is
>> 
>> SELECT foo ; ROLLBACK ; SELECT bar
>> 
>> 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

Responses

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-2014 The PostgreSQL Global Development Group