1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Further reductions in Hot Standby conflict processing. These

come from the realistion that HEAP2_CLEAN records don't
always remove user visible data, so conflict processing for
them can be skipped. Confirm validity using Assert checks,
clarify circumstances under which we log heap_cleanup_info
records. Tuning arises from bug fixing of earlier safety
check failures.
This commit is contained in:
Simon Riggs
2010-04-22 02:15:45 +00:00
parent 95a777c612
commit 781ec6b75d
3 changed files with 14 additions and 11 deletions

View File

@ -29,7 +29,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.134 2010/04/21 19:53:24 sriggs Exp $
* $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.135 2010/04/22 02:15:45 sriggs Exp $
*
*-------------------------------------------------------------------------
*/
@ -274,12 +274,11 @@ vacuum_log_cleanup_info(Relation rel, LVRelStats *vacrelstats)
if (rel->rd_istemp || !XLogIsNeeded())
return;
if (vacrelstats->tuples_deleted > 0)
{
Assert(TransactionIdIsValid(vacrelstats->latestRemovedXid));
/*
* No need to write the record at all unless it contains a valid value
*/
if (TransactionIdIsValid(vacrelstats->latestRemovedXid))
(void) log_heap_cleanup_info(rel->rd_node, vacrelstats->latestRemovedXid);
}
}
/*
@ -687,7 +686,6 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
* Forget the now-vacuumed tuples, and press on, but be careful
* not to reset latestRemovedXid since we want that value to be valid.
*/
Assert(TransactionIdIsValid(vacrelstats->latestRemovedXid));
vacrelstats->num_dead_tuples = 0;
vacuumed_pages++;
}