Re: Are ctid chaining loops safe without relation size checks?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Are ctid chaining loops safe without relation size checks?
Date: 2019-05-15 19:09:34
Message-ID: 20261.1557947374@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> Which I dutifully rewrote. But I'm actually not sure it's safe at all
> for heap to rely on t_ctid links to be valid. What prevents a ctid link
> to point to a page that's since been truncated away?

Nothing, but when would the issue come up? The updated tuple must be
newer than the one pointing at it, so if it's dead then the one pointing
at it must be too, no?

(If we're not checking liveness of x_max before following the link,
we'd have trouble ...)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-05-15 19:19:40 Re: ClonedConstraint typedef is dead code?
Previous Message Alvaro Herrera 2019-05-15 19:07:13 Re: Are ctid chaining loops safe without relation size checks?