|From:||Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>|
|To:||Bernd Helmle <mailings(at)oopsware(dot)de>|
|Subject:||Re: standalone backend PANICs during recovery|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Bernd Helmle wrote:
> While investigating a problem on a streaming hot standby instance at a
> customer site, i got the following when using a standalone backend:
> PANIC: btree_xlog_delete_get_latestRemovedXid: cannot operate with
> inconsistent data
> CONTEXT: xlog redo delete: index 1663/65588/65625; iblk 11, heap
> The responsible PANIC is triggered here:
> btree_xlog_delete_get_latestRemovedXid(XLogReaderState *record)
This PANIC was introduced in the commit below. AFAICS your proposed
patch and rationale are correct.
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
AuthorDate: Fri Aug 3 15:41:18 2012 -0400
CommitDate: Fri Aug 3 15:41:18 2012 -0400
Improve underdocumented btree_xlog_delete_get_latestRemovedXid() code.
As noted by Noah Misch, btree_xlog_delete_get_latestRemovedXid is
critically dependent on the assumption that it's examining a consistent
state of the database. This was undocumented though, so the
seemingly-unrelated check for no active HS sessions might be thought to be
merely an optional optimization. Improve comments, and add an explicit
check of reachedConsistency just to be sure.
This function returns InvalidTransactionId (thereby killing all HS
transactions) in several cases that are not nearly unlikely enough for my
taste. This commit doesn't attempt to fix those deficiencies, just
Back-patch to 9.2, not from any real functional need but just to keep the
branches more closely synced to simplify possible future back-patching.
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
|Next Message||Greg Stark||2016-04-02 22:20:24||Re: Using quicksort for every external sort run|
|Previous Message||Tom Lane||2016-04-02 21:41:48||Re: Add schema-qualified relnames in constraint error messages.|