Skip to content

Commit 49967da

Browse files
committed
Make vacuum a bit more verbose to debug BF failure.
This is temporary. While possibly some more error checking / debugging in this path would be a good thing, it'll not look exactly like this. Discussion: https://postgr.es/m/20200816181604.l54m6kss5ntd6xow@alap3.anarazel.de
1 parent 676a9c3 commit 49967da

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/backend/access/heap/heapam.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6048,7 +6048,16 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask,
60486048
TransactionIdIsInProgress(members[i].xid))
60496049
{
60506050
/* running locker cannot possibly be older than the cutoff */
6051-
Assert(!TransactionIdPrecedes(members[i].xid, cutoff_xid));
6051+
if (TransactionIdPrecedes(members[i].xid, cutoff_xid))
6052+
{
6053+
/* temporary on-bf debugging */
6054+
elog(PANIC, "too old alive locker: multi: %u, member xid: %u, memb-current: %d, memb-progress: %d, cutoff: %u, cutoff-multi: %u, relfrozenxid: %u, relminmxid: %u",
6055+
multi, members[i].xid,
6056+
TransactionIdIsCurrentTransactionId(members[i].xid),
6057+
TransactionIdIsInProgress(members[i].xid),
6058+
cutoff_xid, cutoff_multi,
6059+
relfrozenxid, relminmxid);
6060+
}
60526061
newmembers[nnewmembers++] = members[i];
60536062
has_lockers = true;
60546063
}

src/backend/access/heap/vacuumlazy.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,14 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
13501350
if (HeapTupleIsHotUpdated(&tuple) ||
13511351
HeapTupleIsHeapOnly(&tuple) ||
13521352
params->index_cleanup == VACOPT_TERNARY_DISABLED)
1353+
{
1354+
/* temporary on-bf debugging */
1355+
elog(LOG, "treating dead HOT tuple (updated %d, heap only: %d, index cleanup: %d) as alive",
1356+
HeapTupleIsHotUpdated(&tuple), HeapTupleIsHeapOnly(&tuple),
1357+
params->index_cleanup == VACOPT_TERNARY_DISABLED);
1358+
13531359
nkeep += 1;
1360+
}
13541361
else
13551362
tupgone = true; /* we can delete the tuple */
13561363
all_visible = false;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy