Re: Patch: Write Amplification Reduction Method (WARM)

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch: Write Amplification Reduction Method (WARM)
Date: 2017-04-18 08:25:17
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

On Fri, Apr 14, 2017 at 9:21 PM, Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)
com> wrote:

> Hi Pavan,
> I run a test on current warm patchset, i used pgbench with a scale of
> 20 and a fillfactor of 90 and then start the pgbench run with 6
> clients in parallel i also run sqlsmith on it.
> And i got a core dump after sometime of those things running.
> The assertion that fails is:
> """
> LOG: statement: UPDATE pgbench_tellers SET tbalance = tbalance + 3519
> WHERE tid = 34;
> TRAP: FailedAssertion("!(((bool) (((const void*)(&tup->t_ctid) !=
> ((void *)0)) && (((&tup->t_ctid)->ip_posid & ((((uint16) 1) << 13) -
> 1)) != 0))))", File: "../../../../src/include/access/htup_details.h",
> Line: 659)
> """

Hi Jaime,

Thanks for doing the tests and reporting the problem. Per our chat, the
assertion failure occurs only after a crash recovery. I traced i down to
the point where we were failing to set the root line pointer correctly
during crash recovery. In fact, we were setting it, but after the local
changes are copied to the on-disk image, thus failing to make to the

Can you please test with the attached patch and confirm it works? I was
able to reproduce the exact same assertion on my end and the patch seems to
fix it. But an additional check won't harm.

I'll include the fix in the next set of patches.


Pavan Deolasee
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
warm_crash_recovery_fix.patch application/octet-stream 1.5 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2017-04-18 08:25:53 Re: scram and \password
Previous Message Amit Langote 2017-04-18 08:25:01 Re: On How To Shorten the Steep Learning Curve Towards PG Hacking...