Re: Concurrency bug with vacuum full (cluster) and toast - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Concurrency bug with vacuum full (cluster) and toast
Date
Msg-id CA+TgmoZpZ4UqDkC=huuyPxdn28rpWLGX5_mnokNBF21i8Qk_4w@mail.gmail.com
Whole thread Raw
In response to Concurrency bug with vacuum full (cluster) and toast  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Responses Re: Concurrency bug with vacuum full (cluster) and toast
List pgsql-hackers
On Mon, Mar 18, 2019 at 12:53 PM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> I've discovered bug, when vacuum full fails with error, because it
> couldn't find toast chunks deleted by itself.  That happens because
> cluster_rel() sets OldestXmin, but toast accesses gets snapshot later
> and independently.  That causes heap_page_prune_opt() to clean chunks,
> which rebuild_relation() expects to exist.  This bug very rarely
> happens on busy systems which actively update toast values.  But I
> found way to reliably reproduce it using debugger.

Boy, I really feel like we've talked about this before.  These are
somewhat-related discussions, but none of them are exactly the same
thing:

http://postgr.es/m/1335.1304187758@sss.pgh.pa.us
http://postgr.es/m/20362.1359747327@sss.pgh.pa.us
http://postgr.es/m/87in8nec96.fsf@news-spur.riddles.org.uk

I don't know whether we've actually talked about this precise problem
before and I just can't find the thread, or whether I'm confusing what
you've found here with some closely-related issue.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Chris Travers
Date:
Subject: Re: [HACKERS] Custom compression methods
Next
From: Tom Lane
Date:
Subject: Re: pg_upgrade version checking questions