1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-26 23:43:30 +03:00

Fix longstanding bug found by Atsushi Ogawa: _bt_check_unique would mark

the wrong buffer dirty when trying to kill a dead index entry that's on
a page after the one it started on.  No risk of data corruption, just
inefficiency, but still a bug.
This commit is contained in:
Tom Lane
2005-10-12 17:18:45 +00:00
parent ae049f191d
commit 10f14e6e0d

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.96.2.1 2003/02/21 18:24:54 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.96.2.2 2005/10/12 17:18:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -266,6 +266,9 @@ _bt_check_unique(Relation rel, BTItem btitem, Relation heapRel,
HEAPTUPLE_DEAD)
{
curitemid->lp_flags |= LP_DELETE;
if (nbuf != InvalidBuffer)
SetBufferCommitInfoNeedsSave(nbuf);
else
SetBufferCommitInfoNeedsSave(buf);
}
if (sv_infomask != htup.t_data->t_infomask)