Re: some question about _bt_getbuf
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: 自己 <zoulx1982@163.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Simon Riggs <simon@2ndquadrant.com>
Date: 2018-05-14T17:49:41Z
Lists: pgsql-hackers
=?GBK?B?19S8ug==?= <zoulx1982@163.com> writes: > i run test using pg10.0 on my machine, and the program crashed on _bt_getbuf. > And i found the following code: > the routine _bt_page_recyclable say maybe the page is all-zero page, if so > then the code run (BTPageOpaque) PageGetSpecialPointer(page); it will be failed because > it access invalid memory. > I don't know whether it is so. Look forward t your reply, thanks. This code's clearly broken, as was discussed before: https://www.postgresql.org/message-id/flat/2628.1474272158%40localhost but nothing was done about it, perhaps partly because we didn't have a reproducible test case. Do you have one? regards, tom lane
Commits
-
Avoid emitting a bogus WAL record when recycling an all-zero btree page.
- e8fe3bb23003 9.3.24 landed
- d80ec868fa3a 9.4.19 landed
- cfcfbd39b182 11.0 landed
- 7ddac4e8feba 9.5.14 landed
- 59b2dcbf45ab 10.5 landed
- 568995be6703 9.6.10 landed
- 0905fe8911ea 12.0 landed