From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Steve Kehlet <steve(dot)kehlet(at)gmail(dot)com>, Forums postgresql <pgsql-general(at)postgresql(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1 |
Date: | 2015-06-04 17:27:19 |
Message-ID: | 20150604172719.GY30287@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general 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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-06-04 17:31:29 | Re: [HACKERS] Re: 9.4.1 -> 9.4.2 problem: could not access status of transaction 1 |
Previous Message | Doiron, Daniel | 2015-06-04 17:07:52 | replicating many to one |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-06-04 17:31:29 | Re: [HACKERS] Re: 9.4.1 -> 9.4.2 problem: could not access status of transaction 1 |
Previous Message | Tom Lane | 2015-06-04 17:26:26 | Re: brin regression test intermittent failures |