Skip to content

Commit ba740a0

Browse files
committed
Change Assert(Ptp.t_data->t_xmax == tp.t_data->t_xmin) to :
/* * Read above about cases when !ItemIdIsUsed(Citemid) * (child item is removed)... Due to the fact that * at the moment we don't remove unuseful part of * update-chain, it's possible to get too old * parent row here. Like as in the case which * caused this problem, we stop shrinking here. * I could try to find real parent row but want * not to do it because of real solution will * be implemented anyway, latter, and we are too * close to 6.5 release. - vadim 06/11/99 */ if (Ptp.t_data->t_xmax != tp.t_data->t_xmin) ...
1 parent 3b79cc0 commit ba740a0

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

src/backend/commands/vacuum.c

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.108 1999/06/10 14:17:07 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.109 1999/06/11 09:35:08 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1353,8 +1353,33 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
13531353
Ptp.t_data = (HeapTupleHeader) PageGetItem(Ppage, Pitemid);
13541354
Assert(ItemPointerEquals(&(vtld.new_tid),
13551355
&(Ptp.t_data->t_ctid)));
1356-
Assert(Ptp.t_data->t_xmax == tp.t_data->t_xmin);
1357-
1356+
/*
1357+
* Read above about cases when !ItemIdIsUsed(Citemid)
1358+
* (child item is removed)... Due to the fact that
1359+
* at the moment we don't remove unuseful part of
1360+
* update-chain, it's possible to get too old
1361+
* parent row here. Like as in the case which
1362+
* caused this problem, we stop shrinking here.
1363+
* I could try to find real parent row but want
1364+
* not to do it because of real solution will
1365+
* be implemented anyway, latter, and we are too
1366+
* close to 6.5 release. - vadim 06/11/99
1367+
*/
1368+
if (Ptp.t_data->t_xmax != tp.t_data->t_xmin)
1369+
{
1370+
if (freeCbuf)
1371+
ReleaseBuffer(Cbuf);
1372+
freeCbuf = false;
1373+
ReleaseBuffer(Pbuf);
1374+
for (i = 0; i < num_vtmove; i++)
1375+
{
1376+
Assert(vtmove[i].vpd->vpd_offsets_used > 0);
1377+
(vtmove[i].vpd->vpd_offsets_used)--;
1378+
}
1379+
num_vtmove = 0;
1380+
elog(NOTICE, "Too old parent tuple found - can't continue vc_rpfheap");
1381+
break;
1382+
}
13581383
#ifdef NOT_USED /* I'm not sure that this will wotk properly... */
13591384
/*
13601385
* If this tuple is updated version of row and it
@@ -1382,6 +1407,8 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
13821407
freeCbuf = true;
13831408
break;
13841409
}
1410+
if (num_vtmove == 0)
1411+
break;
13851412
}
13861413
if (freeCbuf)
13871414
ReleaseBuffer(Cbuf);

0 commit comments

Comments
 (0)