Re: Are ctid chaining loops safe without relation size checks? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Are ctid chaining loops safe without relation size checks?
Date
Msg-id 20261.1557947374@sss.pgh.pa.us
Whole thread Raw
In response to Are ctid chaining loops safe without relation size checks?  (Andres Freund <andres@anarazel.de>)
Responses Re: Are ctid chaining loops safe without relation size checks?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Are ctid chaining loops safe without relation size checks?
Next
From: Alvaro Herrera
Date:
Subject: Re: ClonedConstraint typedef is dead code?