Re: server terminated by a query in 7.3
| От | Frank van Vugt |
|---|---|
| Тема | Re: server terminated by a query in 7.3 |
| Дата | |
| Msg-id | 200212131847.39397.ftm.van.vugt@foxi.nl обсуждение |
| Список | pgsql-bugs |
> 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.
В списке pgsql-bugs по дате отправления: