1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-05 09:19:17 +03:00

Remove obsolete "hole in center of page" comment.

A comment from the Berkeley days incorrectly claimed that the page
management code cares about the contents of the hole in the center of
the page (at least in the case of the left half of an nbtree page
split).  Commit 8fa30f906be added an addendum that stated that the
original comment was "probably obsolete".  It's definitely obsolete,
though, so remove the original comment plus the addendum.
This commit is contained in:
Peter Geoghegan 2020-04-14 14:38:28 -07:00
parent 2d59643dbc
commit 4a05a64095

View File

@ -1909,15 +1909,8 @@ _bt_split(Relation rel, BTScanInsert itup_key, Buffer buf, Buffer cbuf,
* By here, the original data page has been split into two new halves, and * By here, the original data page has been split into two new halves, and
* these are correct. The algorithm requires that the left page never * these are correct. The algorithm requires that the left page never
* move during a split, so we copy the new left page back on top of the * move during a split, so we copy the new left page back on top of the
* original. Note that this is not a waste of time, since we also require * original. We need to do this before writing the WAL record, so that
* (in the page management code) that the center of a page always be * XLogInsert can WAL log an image of the page if necessary.
* clean, and the most efficient way to guarantee this is just to compact
* the data by reinserting it into a new left page. (XXX the latter
* comment is probably obsolete; but in any case it's good to not scribble
* on the original page until we enter the critical section.)
*
* We need to do this before writing the WAL record, so that XLogInsert
* can WAL log an image of the page if necessary.
*/ */
PageRestoreTempPage(leftpage, origpage); PageRestoreTempPage(leftpage, origpage);
/* leftpage, lopaque must not be used below here */ /* leftpage, lopaque must not be used below here */