diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-01-10 04:09:50 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-01-10 04:09:50 +0000 |
commit | fcb7c14d02cf69597c926bb09ab8c64e4a6443f6 (patch) | |
tree | d38f4b03461585f4bc921a69fb194d72570dd716 /src/include/postgres.h | |
parent | b86ca72f397292b9d4d0df98ea6d8cac61037430 (diff) | |
download | postgresql-fcb7c14d02cf69597c926bb09ab8c64e4a6443f6.tar.gz postgresql-fcb7c14d02cf69597c926bb09ab8c64e4a6443f6.zip |
Repair subtle VACUUM bug that led to 'HEAP_MOVED_IN was not expected'
errors. VACUUM normally compacts the table back-to-front, and stops
as soon as it gets to a page that it has moved some tuples onto.
(This logic doesn't make for a complete packing of the table, but it
should be pretty close.) But the way it was checking whether it had
got to a page with some moved-in tuples was to look at whether the
current page was the same as the last page of the list of pages that
have enough free space to be move-in targets. And there was other
code that would remove pages from that list once they got full.
There was a kluge that prevented the last list entry from being
removed, but it didn't get the job done. Fixed by keeping a separate
variable that contains the largest block number into which a tuple
has been moved. There's no longer any need to protect the last element
of the fraged_pages list.
Also, fix NOTICE messages to describe elapsed user/system CPU time
correctly.
Diffstat (limited to 'src/include/postgres.h')
0 files changed, 0 insertions, 0 deletions