OSDN Git Service

Respect Hot Standby controls while recycling btree index pages.
authorSimon Riggs <simon@2ndQuadrant.com>
Thu, 16 Jun 2011 09:19:10 +0000 (10:19 +0100)
committerSimon Riggs <simon@2ndQuadrant.com>
Thu, 16 Jun 2011 09:19:10 +0000 (10:19 +0100)
commit758bd2a433d64bed00ca084203b3e5ccfdea4499
tree0bb1fc1ccbba2581b0889e7490b60f61a43dc0ca
parent1568fa75bcf393977425ccb73752b98883a9f375
Respect Hot Standby controls while recycling btree index pages.
Btree pages were recycled after VACUUM deletes all records on a
page and then a subsequent VACUUM occurs after the RecentXmin
horizon is reached. Using RecentXmin meant that we did not respond
correctly to the user controls provide to avoid Hot Standby
conflicts and so spurious conflicts could be generated in some
workload combinations. We now reuse pages only when we reach
RecentGlobalXmin, which can be much later in the presence of long
running queries and is also controlled by vacuum_defer_cleanup_age
and hot_standby_feedback.

Noah Misch and Simon Riggs
src/backend/access/nbtree/nbtpage.c