Re: lazy detoasting - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: lazy detoasting
Date
Msg-id 87sh86gsds.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: lazy detoasting  (Chapman Flack <chap@anastigmatix.net>)
Responses Re: lazy detoasting
List pgsql-hackers
>>>>> "Chapman" == Chapman Flack <chap@anastigmatix.net> writes:

 Chapman> Please bear with me as I check my understanding of snapshot
 Chapman> management by looking at PersistHoldablePortal(). There's a
 Chapman> PushActiveSnapshot(queryDesc->snapshot) in there. Is that
 Chapman> because:

 Chapman> (d) some other reason I haven't thought of ?

It has to be pushed as the active snapshot so that it's the snapshot
that the executor uses to run the query to populate the tuplestore which
becomes the "held" portal content.

I think you're confusing the stack of active snapshots with the registry
of snapshots. The snapshot of a portal that's not currently running in
the executor won't be on the stack, but it will be registered (which is
enough to maintain the session's reported xmin, which is what prevents
visible data from being vacuumed away).

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench - allow to store select results intovariables
Next
From: Jeevan Chalke
Date:
Subject: Re: [sqlsmith] Failed assertion in create_gather_path