Re: lazy detoasting - Mailing list pgsql-hackers

From Tom Lane
Subject Re: lazy detoasting
Date
Msg-id 23711.1522559987@sss.pgh.pa.us
Whole thread Raw
In response to lazy detoasting  (Chapman Flack <chap@anastigmatix.net>)
Responses Re: lazy detoasting
List pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> If I copy an out-of-line, on-disk TOAST pointer into a memory context
> with transaction lifetime, with an eye to detoasting it later in the
> same transaction, are there circumstances where it wouldn't work?

Should be safe *as long as you hold onto a snapshot that can see the
toast value's parent row*.  Otherwise, it's not.

For a counterexample, see the changes we had to make to avoid depending
on out-of-line toast values in the catcaches, commit 08e261cbc.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] why not parallel seq scan for slow functions
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS][PATCH] adding simple sock check for windows