Re: server terminated by a query in 7.3

From: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
To: Jie Liang <jie(at)stbernard(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: server terminated by a query in 7.3
Date: 2002-12-13 17:47:39
Message-ID: 200212131847.39397.ftm.van.vugt@foxi.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-sql

> after I upgrade my postgresql from 7.2 to 7.3, one query always makes server
> 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 =
RelationNodeCacheGetRelation(bufHdr->tag.rnode);

- /*
- * The relcache is not supposed to throw away temp rels, so
this
- * should always succeed.
- */
- Assert(bufrel != NULL);
-
/* flush this page */
! smgrwrite(DEFAULT_SMGR, bufrel, bufHdr->tag.blockNum,
! (char *) MAKE_PTR(bufHdr->data));
! LocalBufferFlushCount++;

! /* drop refcount incremented by RelationNodeCacheGetRelation
*/
! RelationDecrementReferenceCount(bufrel);
}

/*
--- 90,113 ----
{
Relation bufrel =
RelationNodeCacheGetRelation(bufHdr->tag.rnode);

/* flush this page */
! if (bufrel == (Relation) NULL)
! {
! smgrblindwrt(DEFAULT_SMGR,
! bufHdr->tag.rnode,
! bufHdr->tag.blockNum,
! (char *)
MAKE_PTR(bufHdr->data));
! }
! else
! {
! smgrwrite(DEFAULT_SMGR, bufrel,
! bufHdr->tag.blockNum,
! (char *) MAKE_PTR(bufHdr->data));
! /* drop refcount incremented by
RelationNodeCacheGetRelation */
! RelationDecrementReferenceCount(bufrel);
! }

! LocalBufferFlushCount++;
}

/*

Regards,

Frank.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Nathan Mueller 2002-12-13 18:06:09 Re: Bug #838: SSL problems in 7.3
Previous Message Jie Liang 2002-12-13 17:29:55 server terminated by a query in 7.3

Browse pgsql-sql by date

  From Date Subject
Next Message Ludwig Lim 2002-12-13 17:50:23 A PL/PgSQL Question
Previous Message javier garcia 2002-12-13 17:43:59 UPDATE comparing dates and non-dates data