mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 06:41:24 +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:
parent
25a5b740cd
commit
5c05d165af
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.106.2.1 2004/08/17 23:16:07 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.106.2.2 2005/10/12 17:18:31 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -270,6 +270,9 @@ _bt_check_unique(Relation rel, BTItem btitem, Relation heapRel,
|
|||||||
HEAPTUPLE_DEAD)
|
HEAPTUPLE_DEAD)
|
||||||
{
|
{
|
||||||
curitemid->lp_flags |= LP_DELETE;
|
curitemid->lp_flags |= LP_DELETE;
|
||||||
|
if (nbuf != InvalidBuffer)
|
||||||
|
SetBufferCommitInfoNeedsSave(nbuf);
|
||||||
|
else
|
||||||
SetBufferCommitInfoNeedsSave(buf);
|
SetBufferCommitInfoNeedsSave(buf);
|
||||||
}
|
}
|
||||||
if (sv_infomask != htup.t_data->t_infomask)
|
if (sv_infomask != htup.t_data->t_infomask)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user