Re: [TRAP: FailedAssertion] causing server to crash

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Neha Sharma <neha(dot)sharma(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [TRAP: FailedAssertion] causing server to crash
Date: 2017-08-07 06:06:14
Message-ID: CAMsr+YG=ABchuvCqEfqU26t1zXYZu4qL_EMpJ0LcG-+h5FsT5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7 August 2017 at 14:04, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
wrote:

> On Fri, Jul 21, 2017 at 7:17 PM, Kyotaro HORIGUCHI
> <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> > In vac_truncate_clog, TruncateCLOG is called before
> > SetTransactionIdLimit, which advances
> > ShmemVariableCache->oldestXid. Given that the assertion in
> > TruncateCLOG is valid, they should be called in reverse order. I
> > suppose that CLOG files can be safely truncated after advancing
> > XID limits.
>
> If we keep the assertion by changing the order of changes to match the
> comment like this, then don't we still have a problem if another
> backend moves it backwards because of the data race I mentioned? That
> too could be fixed (perhaps by teaching SetTransactionIdLimit not to
> overwrite higher values), but it sounds like the assertion might be a
> mistake.
> <http://www.enterprisedb.com>
>

I think so - specifically, that it's a leftover from a revision where the
xid limit was advanced before clog truncation.

I'll be finding time in the next couple of days to look more closely and
ensure that's all it is.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2017-08-07 06:22:30 Re: Tuple-routing for certain partitioned tables not working as expected
Previous Message Thomas Munro 2017-08-07 06:04:04 Re: [TRAP: FailedAssertion] causing server to crash