Re: Multixid hindsight design

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: hlinnaka(at)iki(dot)fi
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: Multixid hindsight design
Date: 2015-05-11 22:51:44
Message-ID: 25576.1431384704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> So the lesson here is that having a permanent pg_multixact is not nice,
> and we should get rid of it. Here's how to do that:

That would be cool, but ...

> Looking at the tuple header, the CID and CTID fields are only needed,
> when either xmin or xmax is running. Almost: in a HOT-updated tuple,
> CTID is required even after xmax has committed, but since it's a HOT
> update, the new tuple is always on the same page so you only need the
> offsetnumber part.

I think this is totally wrong. HOT update or not, you need the forward
link represented by ctid not just until xmin/xmax commit, but until
they're in the past according to all active snapshots. That's so that
other transactions can chain forward to the "current" version of a tuple
which they found according to their snapshots.

It might be you can salvage the idea anyway, since it's still true that
the forward links wouldn't be needed after a crash and restart. But the
argument as stated is wrong.

(There's also the question of forensic requirements, although I'm aware
that it's barely worth bringing that up since nobody else here seems to
put much weight on that.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-05-11 23:04:32 Re: Multi-xacts and our process problem
Previous Message Bruce Momjian 2015-05-11 22:47:55 Re: Multi-xacts and our process problem