From 43c135e351b69307d5713cef5160f085b358839e Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Mon, 7 Jun 1999 14:28:22 +0000 Subject: [PATCH] Have to release meta page before reading root one! < 6.5 versions were just not affected by this bug due to locking. --- src/backend/access/nbtree/nbtpage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index ea01a8e1d8..d5ac5c3ea2 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.23 1999/05/25 22:04:12 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.24 1999/06/07 14:28:22 vadim Exp $ * * NOTES * Postgres btree pages look like ordinary relation pages. The opaque @@ -265,10 +265,10 @@ _bt_getroot(Relation rel, int access) } else { - rootbuf = _bt_getbuf(rel, metad->btm_root, access); + rootblkno = metad->btm_root; + _bt_relbuf(rel, metabuf, BT_READ); /* done with the meta page */ - /* done with the meta page */ - _bt_relbuf(rel, metabuf, BT_READ); + rootbuf = _bt_getbuf(rel, rootblkno, access); } /* -- 2.40.0