mirror of
https://github.com/postgres/postgres.git
synced 2025-11-16 15:02:33 +03:00
Remove old-style VACUUM FULL (which was known for a little while as
VACUUM FULL INPLACE), along with a boatload of subsidiary code and complexity. Per discussion, the use case for this method of vacuuming is no longer large enough to justify maintaining it; not to mention that we don't wish to invest the work that would be needed to make it play nicely with Hot Standby. Aside from the code directly related to old-style VACUUM FULL, this commit removes support for certain WAL record types that could only be generated within VACUUM FULL, redirect-pointer removal in heap_page_prune, and nontransactional generation of cache invalidation sinval messages (the last being the sticking point for Hot Standby). We still have to retain all code that copes with finding HEAP_MOVED_OFF and HEAP_MOVED_IN flag bits on existing tuples. This can't be removed as long as we want to support in-place update from pre-9.0 databases.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.117 2010/02/01 13:40:28 sriggs Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.118 2010/02/08 04:33:53 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Postgres btree pages look like ordinary relation pages. The opaque
|
||||
@@ -877,7 +877,7 @@ _bt_parent_deletion_safe(Relation rel, BlockNumber target, BTStack stack)
|
||||
* frequently.
|
||||
*/
|
||||
int
|
||||
_bt_pagedel(Relation rel, Buffer buf, BTStack stack, bool vacuum_full)
|
||||
_bt_pagedel(Relation rel, Buffer buf, BTStack stack)
|
||||
{
|
||||
int result;
|
||||
BlockNumber target,
|
||||
@@ -1207,14 +1207,13 @@ _bt_pagedel(Relation rel, Buffer buf, BTStack stack, bool vacuum_full)
|
||||
|
||||
/*
|
||||
* Mark the page itself deleted. It can be recycled when all current
|
||||
* transactions are gone; or immediately if we're doing VACUUM FULL.
|
||||
* transactions are gone.
|
||||
*/
|
||||
page = BufferGetPage(buf);
|
||||
opaque = (BTPageOpaque) PageGetSpecialPointer(page);
|
||||
opaque->btpo_flags &= ~BTP_HALF_DEAD;
|
||||
opaque->btpo_flags |= BTP_DELETED;
|
||||
opaque->btpo.xact =
|
||||
vacuum_full ? FrozenTransactionId : ReadNewTransactionId();
|
||||
opaque->btpo.xact = ReadNewTransactionId();
|
||||
|
||||
/* And update the metapage, if needed */
|
||||
if (BufferIsValid(metabuf))
|
||||
@@ -1350,7 +1349,7 @@ _bt_pagedel(Relation rel, Buffer buf, BTStack stack, bool vacuum_full)
|
||||
{
|
||||
/* recursive call will release pbuf */
|
||||
_bt_relbuf(rel, rbuf);
|
||||
result = _bt_pagedel(rel, pbuf, stack->bts_parent, vacuum_full) + 1;
|
||||
result = _bt_pagedel(rel, pbuf, stack->bts_parent) + 1;
|
||||
_bt_relbuf(rel, buf);
|
||||
}
|
||||
else if (parent_one_child && rightsib_empty)
|
||||
@@ -1358,7 +1357,7 @@ _bt_pagedel(Relation rel, Buffer buf, BTStack stack, bool vacuum_full)
|
||||
_bt_relbuf(rel, pbuf);
|
||||
_bt_relbuf(rel, buf);
|
||||
/* recursive call will release rbuf */
|
||||
result = _bt_pagedel(rel, rbuf, stack, vacuum_full) + 1;
|
||||
result = _bt_pagedel(rel, rbuf, stack) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user