pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Replication lag tracking for walsenders
Date: Sat, 22 Apr 2017 11:41:01 -0400
Message-ID: <4219.1492875661@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEepm=1-QRkb3Y+hO+tQVyKqH9dp0GVVWkMmsMDy1izpVZ4XLw@mail.gmail.com>
References: <20170421190629.3srqyohjocgdvhhr@alvherre.pgsql>
	<27895.1492808648@sss.pgh.pa.us>
	<CAEepm=3N59Qi=Mo0mb1SmHVdEryb+jdtqEvmsp60bBVBeF+eVQ@mail.gmail.com>
	<CANP8+jKwXbP8642zwZb==fQcqcLD-Fc1jEcivCqmEh0z4LUS6w@mail.gmail.com>
	<CAEepm=1-QRkb3Y+hO+tQVyKqH9dp0GVVWkMmsMDy1izpVZ4XLw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Thomas Munro <thomas.munro@enterprisedb.com> writes:
> The assertion fails reliably for me, because standby2's reported write
> LSN jumps backwards after the timeline changes: for example I see
> 3020000 then 3028470 then 3020000 followed by a normal progression.
> Surprisingly, 004_timeline_switch.pl reports success anyway.  I'm not
> sure why the test fails sometimes on tern, but you can see that even
> when it passed on tern the assertion had failed.

Whoa.  This just turned into a much larger can of worms than I expected.
How can it be that processes are getting assertion crashes and yet the
test framework reports success anyway?  That's impossibly
broken/unacceptable.

Looking closer at the tern report we started the thread with, there
are actually TWO assertion trap reports, the one Alvaro noted and
another one in 009_twophase_master.log:

TRAP: FailedAssertion("!(*ptr == ((TransactionId) 0) || (*ptr == parent && overwriteOK))", File: "subtrans.c", Line: 92)

When I run the recovery test on my own machine, it reports success
(quite reliably, I tried a bunch of times yesterday), but now that
I know to look:

$ grep TRAP tmp_check/log/*
tmp_check/log/009_twophase_master.log:TRAP: FailedAssertion("!(*ptr == ((TransactionId) 0) || (*ptr == parent && overwriteOK))", File: "subtrans.c", Line: 92)

So we now have three problems not just one:

* How is it that the TAP tests aren't noticing the failure?  This one,
to my mind, is a code-red situation, as it basically invalidates every
TAP test we've ever run.

* If Thomas's explanation for the timeline-switch assertion is correct,
why isn't it reproducible everywhere?

* What's with that second TRAP?

> Here is a fix for the assertion failure.

As for this patch itself, is it reasonable to try to assert that the
timeline has in fact changed?

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (22+ messages)  latest in thread

Message-ID: <4219.1492875661@sss.pgh.pa.us>
Permalink:  ../4219.1492875661@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4219.1492875661@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thomas.munro@enterprisedb.com, simon@2ndquadrant.com, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Replication lag tracking for walsenders
  In-Reply-To: <4219.1492875661@sss.pgh.pa.us>
  References: <20170421190629.3srqyohjocgdvhhr@alvherre.pgsql> <27895.1492808648@sss.pgh.pa.us> <CAEepm=3N59Qi=Mo0mb1SmHVdEryb+jdtqEvmsp60bBVBeF+eVQ@mail.gmail.com> <CANP8+jKwXbP8642zwZb==fQcqcLD-Fc1jEcivCqmEh0z4LUS6w@mail.gmail.com> <CAEepm=1-QRkb3Y+hO+tQVyKqH9dp0GVVWkMmsMDy1izpVZ4XLw@mail.gmail.com> <4219.1492875661@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox