Re: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Date
Msg-id 20150604172719.GY30287@alap3.anarazel.de
Whole thread Raw
In response to Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
List pgsql-hackers
Hi,

On 2015-06-04 12:57:42 -0400, Robert Haas wrote:
> +    /*
> +     * Do we need an emergency autovacuum?  If we're not sure, assume yes.
> +     */
> +    return !oldestOffsetKnown ||
> +        (nextOffset - oldestOffset > MULTIXACT_MEMBER_SAFE_THRESHOLD);

I think without teaching autovac about those rules, this might just lead
to lots of autovac processes starting without knowing they should do
something? They know about autovacuum_multixact_freeze_age, but they
know neither about !oldestOffsetKnown nor, afaics, about pending offset
wraparounds?

> -static MultiXactOffset
> -find_multixact_start(MultiXactId multi)
> +static bool
> +find_multixact_start(MultiXactId multi, MultiXactOffset *result)
>  {
>      MultiXactOffset offset;
>      int            pageno;
> @@ -2630,6 +2741,9 @@ find_multixact_start(MultiXactId multi)
>      pageno = MultiXactIdToOffsetPage(multi);
>      entryno = MultiXactIdToOffsetEntry(multi);
>
> +    if (!SimpleLruDoesPhysicalPageExist(MultiXactOffsetCtl, pageno))
> +        return false;
> +
>      /* lock is acquired by SimpleLruReadPage_ReadOnly */
>      slotno = SimpleLruReadPage_ReadOnly(MultiXactOffsetCtl, pageno, multi);
>      offptr = (MultiXactOffset *) MultiXactOffsetCtl->shared->page_buffer[slotno];
> @@ -2642,25 +2756,31 @@ find_multixact_start(MultiXactId multi)
>

I think it'd be a good idea to also return false in case of a
InvalidMultiXactId - that'll be returned if the page has been zeroed.


Andres


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: brin regression test intermittent failures
Next
From: Robert Haas
Date:
Subject: Re: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1