Re: ERROR: cannot GetMultiXactIdMembers() during recovery - Mailing list pgsql-hackers

From Andres Freund
Subject Re: ERROR: cannot GetMultiXactIdMembers() during recovery
Date
Msg-id 20150223141300.GB30784@awork2.anarazel.de
Whole thread Raw
In response to ERROR: cannot GetMultiXactIdMembers() during recovery  (Marko Tiikkaja <marko@joh.to>)
Responses Re: ERROR: cannot GetMultiXactIdMembers() during recovery
Re: ERROR: cannot GetMultiXactIdMembers() during recovery
List pgsql-hackers
Hi,

On 2015-02-23 15:00:35 +0100, Marko Tiikkaja wrote:
> Andres asked me on IRC to report this here.  Since we upgraded our standby
> servers to 9.1.15 (though the master is still running 9.1.14), we've seen
> the error in $SUBJECT a number of times.

FWIW, I think this is just as borked in 9.1.14 and will likely affect
all of 9.0 - 9.2. The problem is that in those releases multixacts
aren't maintained on the standby in a way that allows access.

index_getnext() itself is actually pretty easy to fix, it already checks
whether the scan started while in recovery when using the result of the
error triggering HeapTupleSatisfiesVacuum(), just too late.  I don't
remember other HTSV callers that can run in recovery, given that DDL is
obviously impossible and we don't support serializable while in
recovery.

Alternatively we could make MultiXactIdIsRunning() return false < 9.3
when in recovery. I think that'd end up fixing things, but it seems
awfully fragile to me.

I do see a HTSU in pgrowlocks.c - that's not really safe during recovery< 9.3, given it accesses multixacts. I guess it
needsto throw an error.
 

I wonder if we shouldn't put a Assert() in HTSV/HTSU to prevent such
problems.

Greetings,

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



pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: ERROR: cannot GetMultiXactIdMembers() during recovery
Next
From: Michael Paquier
Date:
Subject: Re: pg_dump gets attributes from tables in extensions