Re: Computing the conflict xid for index page-level-vacuum on primary

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: Re: Computing the conflict xid for index page-level-vacuum on primary
Date: 2018-12-14 18:47:29
Message-ID: 20181214184729.3acoji6ljcxsoxqi@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2018-12-14 21:39:48 +0300, Alexander Korotkov wrote:
> On Fri, Dec 14, 2018 at 4:43 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > This leads me to think that we possibly should move computation of the
> > last removed xid from recovery to the primary, during the generation of
> > the xl_btree_delete WAL record.
>
> Do I understand correctly that we need this xid computation, because
> we may delete some index tuples using kill_prior_tuple before we prune
> corresponding heap tuples (which would be also replicated and cause
> required conflict)?

Correct.

> If so, then can we just give up with that? That is before setting
> kill_prior_tuple = true, prune corresponding heap tuples.

That'd require WAL logging such changes, which'd be pretty bad, because
we'd need to do it one-by-one. What we could do, and what I suggested
earlier, is that we do a bit more pruning when emitting such WAL
records.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-12-14 18:47:53 Re: Ryu floating point output patch
Previous Message Robert Haas 2018-12-14 18:46:03 Re: removal of dangling temp tables