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

From Alexander Korotkov
Subject Re: Concurrency bug with vacuum full (cluster) and toast
Date
Msg-id CAPpHfdsontrpWHFQDkt-=svaU=AJ-9MqKZrSJgbj8U9EASURKA@mail.gmail.com
Whole thread Raw
In response to Re: Concurrency bug with vacuum full (cluster) and toast  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Concurrency bug with vacuum full (cluster) and toast
List pgsql-hackers
On Tue, Mar 19, 2019 at 6:48 PM Robert Haas <robertmhaas@gmail.com> wrote:
> 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.

Thank you for pointing, but none of the threads you pointed describe
this exact problem.  Now I see this bug have a set of cute siblings :)

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


pgsql-hackers by date:

Previous
From: Eric Hanson
Date:
Subject: Re: extensions are hitting the ceiling
Next
From: Tom Lane
Date:
Subject: Re: Willing to fix a PQexec() in libpq module