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

postgres crash on CURSORS

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: postgres crash on CURSORS
Date: 2000-04-04 19:12:53
Message-ID: 200004041912.PAA25382@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
I have found I can crash the backend with the following queries:

	test=> BEGIN WORK;
	BEGIN
	test=> DECLARE bigtable_cursor CURSOR FOR
	test-> SELECT * FROM bigtable;
	SELECT
	test=> FETCH 3 prior FROM bigtable_cursor;
	ERROR:  parser: parse error at or near "prior"
	test=> FETCH prior FROM bigtable_cursor;
	pqReadData() -- backend closed the channel unexpectedly.
	        This probably means the backend terminated abnormally
	        before or while processing the request.
	The connection to the server was lost. Attempting reset: Succeeded.

Here is the backtrace.  Comments?

---------------------------------------------------------------------------


#0  0x281d2d65 in kill ()
#1  0x2821ea5d in abort ()
#2  0x8146548 in ExcAbort (excP=0x8199294, detail=0, data=0x0, 
    message=0x81812ad "!(MyProc->xmin != 0)") at excabort.c:27
#3  0x8146497 in ExcUnCaught (excP=0x8199294, detail=0, data=0x0, 
    message=0x81812ad "!(MyProc->xmin != 0)") at exc.c:170
#4  0x81464ef in ExcRaise (excP=0x8199294, detail=0, data=0x0, 
    message=0x81812ad "!(MyProc->xmin != 0)") at exc.c:187
#5  0x8145b3a in ExceptionalCondition (
    conditionName=0x81812ad "!(MyProc->xmin != 0)", exceptionP=0x8199294, 
    detail=0x0, fileName=0x81811a3 "sinval.c", lineNumber=362) at assert.c:73
#6  0x8103730 in GetSnapshotData (serializable=0 '\000') at sinval.c:362
#7  0x81501d7 in SetQuerySnapshot () at tqual.c:611
#8  0x810c329 in pg_exec_query_dest (
    query_string=0x81cd398 "FETCH prior FROM bigtable_cursor;\n", dest=Debug, 
    aclOverride=0) at postgres.c:677
#9  0x810c244 in pg_exec_query (
    query_string=0x81cd398 "FETCH prior FROM bigtable_cursor;\n")
    at postgres.c:607
#10 0x810d43d in PostgresMain (argc=4, argv=0x8047534, real_argc=4, 
    real_argv=0x8047534) at postgres.c:1642
#11 0x80c07fc in main (argc=4, argv=0x8047534) at main.c:103
#12 0x8062a9c in __start ()

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2000-04-04 19:26:19
Subject: CURSOR after hitting end
Previous:From: Daniele OrlandiDate: 2000-04-04 16:54:19
Subject: Indexes growing continuously

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