Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1810A477027 for ; Fri, 13 Dec 2002 12:46:47 -0500 (EST) Received: from gatefox.foxi.nl (a194-109-246-192.adsl.xs4all.nl [194.109.246.192]) by postgresql.org (Postfix) with ESMTP id 3AEC4476FB2 for ; Fri, 13 Dec 2002 12:45:59 -0500 (EST) Received: from techfox (techfox.foxi [192.168.0.79]) by gatefox.foxi.nl (8.10.2/8.10.2) with ESMTP id gBDHk0W28148; Fri, 13 Dec 2002 18:46:00 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Frank van Vugt Organization: Foxi Consultants in Technology To: Jie Liang Subject: Re: server terminated by a query in 7.3 Date: Fri, 13 Dec 2002 18:47:39 +0100 User-Agent: KMail/1.4.3 Cc: pgsql-bugs@postgresql.org References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200212131847.39397.ftm.van.vugt@foxi.nl> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/155 X-Sequence-Number: 5141 > after I upgrade my postgresql from 7.2 to 7.3, one query always makes ser= ver > terminated This is caused by the vacuum of a temp table. Tom fixed it already about a week ago and provided the patch here: *** src/backend/storage/buffer/localbuf.c.orig Wed Sep 4 16:31:25 2002 --- src/backend/storage/buffer/localbuf.c Thu Dec 5 17:48:10 2002 *************** *** 90,108 **** { Relation bufrel =3D=20 RelationNodeCacheGetRelation(bufHdr->tag.rnode); =20=20 - /* - * The relcache is not supposed to throw away temp rels, so= =20 this - * should always succeed. - */ - Assert(bufrel !=3D NULL); -=20 /* flush this page */ ! smgrwrite(DEFAULT_SMGR, bufrel, bufHdr->tag.blockNum, ! (char *) MAKE_PTR(bufHdr->data)); ! LocalBufferFlushCount++; =20=20 ! /* drop refcount incremented by RelationNodeCacheGetRelatio= n=20 */ ! RelationDecrementReferenceCount(bufrel); } =20=20 /* --- 90,113 ---- { Relation bufrel =3D=20 RelationNodeCacheGetRelation(bufHdr->tag.rnode); =20=20 /* flush this page */ ! if (bufrel =3D=3D (Relation) NULL) ! { ! smgrblindwrt(DEFAULT_SMGR, ! bufHdr->tag.rnode, ! bufHdr->tag.blockNum, ! (char *)=20 MAKE_PTR(bufHdr->data)); ! } ! else ! { ! smgrwrite(DEFAULT_SMGR, bufrel, ! bufHdr->tag.blockNum, ! (char *) MAKE_PTR(bufHdr->data)); ! /* drop refcount incremented by=20 RelationNodeCacheGetRelation */ ! RelationDecrementReferenceCount(bufrel); ! } =20=20 ! LocalBufferFlushCount++; } =20=20 /* Regards, Frank.