Re: 9.2.1 & index-only scans : abnormal heap fetches after VACUUM FULL

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Kevin Grittner <kgrittn(at)mail(dot)com>, Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.2.1 & index-only scans : abnormal heap fetches after VACUUM FULL
Date: 2014-01-24 21:52:55
Message-ID: CAJKUy5jUgCFxz=zdZ5esqcpKmunTpA+-Hj_s5hRD8ep8B4TOYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 3, 2013 at 11:25 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> Is everyone else OK with this approach? Updated patch attached.
>

Hi,

I started to look at this patch and i found that it fails an assertion
as soon as you run a VACUUM FULL after a lazy VACUUM even if those are
on unrelated relations. For example in an assert-enabled build with
the regression database run:

VACUUM customer;
[... insert here whatever commands you like or nothing at all ...]
VACUUM FULL tenk1;

TRAP: FailedAssertion("!(InRecovery || ( ((void) ((bool) ((!
assert_enabled) || ! (!((heapBuf) <= NBuffers && (heapBuf) >=
-NLocBuffer)) || (ExceptionalCondition("!((heapBuf) <= NBuffers &&
(heapBuf) >= -NLocBuffer)", ("FailedAssertion"), "visibilitymap.c",
260), 0)))), (heapBuf) != 0 ))", File: "visibilitymap.c", Line: 260)
LOG: server process (PID 25842) was terminated by signal 6: Aborted
DETAIL: Failed process was running: vacuum FULL customer;
LOG: terminating any other active server processes

trace:
(gdb) bt
#0 0x00007f9a3d00d475 in *__GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f9a3d0106f0 in *__GI_abort () at abort.c:92
#2 0x0000000000777597 in ExceptionalCondition (
conditionName=conditionName(at)entry=0x7cd3b8 "!(InRecovery || (
((void) ((bool) ((! assert_enabled) || ! (!((heapBuf) <= NBuffers &&
(heapBuf) >= -NLocBuffer)) || (ExceptionalCondition(\"!((heapBuf) <=
NBuffers && (heapBuf) >= -NLocBuffer)\", (\"Fai"...,
errorType=errorType(at)entry=0x7b0730 "FailedAssertion",
fileName=fileName(at)entry=0x7cd105 "visibilitymap.c",
lineNumber=lineNumber(at)entry=260) at assert.c:54
#3 0x00000000004a7d99 in visibilitymap_set
(rel=rel(at)entry=0x7f9a3da56a00, heapBlk=heapBlk(at)entry=0,
heapBuf=heapBuf(at)entry=0, recptr=recptr(at)entry=0, vmBuf=220,
cutoff_xid=2) at visibilitymap.c:260
#4 0x00000000004a33e5 in update_page_vm (relation=0x7f9a3da56a00,
page=page(at)entry=0x1868b18 "", blkno=0) at rewriteheap.c:702
#5 0x00000000004a3668 in raw_heap_insert
(state=state(at)entry=0x1849e98, tup=tup(at)entry=0x184f208) at
rewriteheap.c:641
#6 0x00000000004a3b8b in rewrite_heap_tuple
(state=state(at)entry=0x1849e98, old_tuple=old_tuple(at)entry=0x1852a50,
new_tuple=new_tuple(at)entry=0x184f208)
at rewriteheap.c:433
#7 0x000000000055c373 in reform_and_rewrite_tuple
(tuple=tuple(at)entry=0x1852a50,
oldTupDesc=oldTupDesc(at)entry=0x7f9a3da4d350,
newTupDesc=newTupDesc(at)entry=0x7f9a3da599a8,
values=values(at)entry=0x1852f40, isnull=isnull(at)entry=0x184f920 "",
newRelHasOids=1 '\001',
rwstate=rwstate(at)entry=0x1849e98) at cluster.c:1670

--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566 Cell: +593 987171157

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2014-01-24 22:25:19 Re: Standalone synchronous master
Previous Message Josh Berkus 2014-01-24 21:29:45 Re: Standalone synchronous master