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

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

pgsql-bugs by date

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

pgsql-sql by date

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

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