From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Toast issues with OldestXmin going backwards |
Date: | 2018-04-21 18:25:05 |
Message-ID: | 20180421174733.jatrclmvtfmo2vzg@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2018-04-21 14:16:27 +0100, Andrew Gierth wrote:
> >>>>> "Amit" == Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
>
> Amit> (c) Change the logic during rewrite such that it can detect this
> Amit> situation and skip copying the tuple in the main table,
>
> So I dug into this one and it looks to me like the best approach. Here's
> a draft patch against 10-stable, if nobody can think of any showstoppers
> then I'll do the rest of the versions and commit them.
Please wait for a bit. This isn't a trivial change, and I would like to
wrap my head around it.
At the very least this seems like it could cause extreme slowdowns for
large tables that have the right update/delete patterns?
> + /*
> + * OldestXmin going backwards can mean we have a RECENTLY_DEAD row that
> + * contains toast pointers whose toast rows have already been vacuumed
> + * away (or in the worst but unlikely case, recycled). If so, then the
> + * row must really be dead to all snapshots that could access it, so
> + * treat it as DEAD instead.
> + */
How is it guaranteed that the recheck doesn't find a different toast
tuple at the relevant position?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Gasper Zejn | 2018-04-21 19:21:39 | Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS |
Previous Message | Tom Lane | 2018-04-21 17:29:52 | Re: Boolean partitions syntax |