Search Postgresql Archives

Re: [HACKERS] Re: 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux