public inbox for [email protected]help / color / mirror / Atom feed
[PATCH 2/2] fix 2+ messages / 2 participants [nested] [flat]
* [PATCH 2/2] fix @ 2020-08-01 02:24 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: Justin Pryzby @ 2020-08-01 02:24 UTC (permalink / raw) --- src/backend/access/heap/vacuumlazy.c | 29 +++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 78d1db9ae2..b6015c9297 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -1860,7 +1860,6 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats) tblk = ItemPointerGetBlockNumber(&vacrelstats->dead_tuples->itemptrs[tupindex]); vacrelstats->blkno = tblk; - vacrelstats->offnum = ItemPointerGetOffsetNumber(&vacrelstats->dead_tuples->itemptrs[tupindex]); buf = ReadBufferExtended(onerel, MAIN_FORKNUM, tblk, RBM_NORMAL, vac_strategy); if (!ConditionalLockBufferForCleanup(buf)) @@ -1937,7 +1936,6 @@ lazy_vacuum_page(Relation onerel, BlockNumber blkno, Buffer buffer, if (tblk != blkno) break; /* past end of tuples for this block */ toff = ItemPointerGetOffsetNumber(&dead_tuples->itemptrs[tupindex]); - vacrelstats->offnum = toff; itemid = PageGetItemId(page, toff); ItemIdSetUnused(itemid); unused[uncnt++] = toff; @@ -2022,6 +2020,7 @@ lazy_check_needs_freeze(Buffer buf, bool *hastup, LVRelStats *vacrelstats) OffsetNumber offnum, maxoff; HeapTupleHeader tupleheader; + LVSavedErrInfo saved_err_info; *hastup = false; @@ -2034,6 +2033,11 @@ lazy_check_needs_freeze(Buffer buf, bool *hastup, LVRelStats *vacrelstats) if (PageIsNew(page) || PageIsEmpty(page)) return false; + /* Update error traceback information */ + update_vacuum_error_info(vacrelstats, &saved_err_info, + VACUUM_ERRCB_PHASE_SCAN_HEAP, vacrelstats->blkno, + InvalidOffsetNumber); + maxoff = PageGetMaxOffsetNumber(page); for (offnum = FirstOffsetNumber; offnum <= maxoff; @@ -2056,10 +2060,13 @@ lazy_check_needs_freeze(Buffer buf, bool *hastup, LVRelStats *vacrelstats) if (heap_tuple_needs_freeze(tupleheader, FreezeLimit, MultiXactCutoff, buf)) - return true; + break; } /* scan along page */ - return false; + /* Revert to the previous phase information for error traceback */ + restore_vacuum_error_info(vacrelstats, &saved_err_info); + + return offnum <= maxoff ? true : false; } /* @@ -2501,7 +2508,7 @@ lazy_cleanup_index(Relation indrel, *stats = index_vacuum_cleanup(&ivinfo, *stats); - /* Revert back to the old phase information for error traceback */ + /* Revert to the old phase information for error traceback */ restore_vacuum_error_info(vacrelstats, &saved_err_info); pfree(vacrelstats->indname); vacrelstats->indname = NULL; @@ -3590,8 +3597,8 @@ vacuum_error_callback(void *arg) if (BlockNumberIsValid(errinfo->blkno)) { if (OffsetNumberIsValid(errinfo->offnum)) - errcontext("while scanning block %u and offset %u of relation \"%s.%s\"", - errinfo->blkno, errinfo->offnum, errinfo->relnamespace, errinfo->relname); + errcontext("while scanning block %u of relation \"%s.%s\", item offset %u", + errinfo->blkno, errinfo->relnamespace, errinfo->relname, errinfo->offnum); else errcontext("while scanning block %u of relation \"%s.%s\"", errinfo->blkno, errinfo->relnamespace, errinfo->relname); @@ -3601,12 +3608,8 @@ vacuum_error_callback(void *arg) case VACUUM_ERRCB_PHASE_VACUUM_HEAP: if (BlockNumberIsValid(errinfo->blkno)) { - if (OffsetNumberIsValid(errinfo->offnum)) - errcontext("while vacuuming block %u and offset %u of relation \"%s.%s\"", - errinfo->blkno, errinfo->offnum, errinfo->relnamespace, errinfo->relname); - else - errcontext("while vacuuming block %u of relation \"%s.%s\"", - errinfo->blkno, errinfo->relnamespace, errinfo->relname); + errcontext("while vacuuming block %u of relation \"%s.%s\"", + errinfo->blkno, errinfo->relnamespace, errinfo->relname); } break; -- 2.17.0 --OQhbRXNHSL5w/5po-- ^ permalink raw reply [nested|flat] 2+ messages in thread
* configure failures on chipmunk @ 2024-08-20 21:48 Alvaro Herrera <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2024-08-20 21:48 UTC (permalink / raw) To: Heikki Linnakangas <[email protected]>; +Cc: pgsql-hackers Hi. I noticed chipmunk is failing in configure: checking whether the C compiler works... no configure: error: in `/home/pgbfarm/buildroot/HEAD/pgsql.build': configure: error: C compiler cannot create executables You may want to give it a look. Thanks! -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "This is what I like so much about PostgreSQL. Most of the surprises are of the "oh wow! That's cool" Not the "oh shit!" kind. :)" Scott Marlowe, http://archives.postgresql.org/pgsql-admin/2008-10/msg00152.php ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-08-20 21:48 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-08-01 02:24 [PATCH 2/2] fix Justin Pryzby <[email protected]> 2024-08-20 21:48 configure failures on chipmunk Alvaro Herrera <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox