On 2016-07-28 23:08:13 -0400, Robert Haas wrote:
> On Thu, Jul 28, 2016 at 7:29 PM, Andres Freund <andres@anarazel.de> wrote:
> > I think just iterating through the active snapshots would have been
> > fine. Afaics there's no guarantee that the first active snapshot pushed
> > is the relevant one - in contrast to registered one, which are ordered
> > by virtue of the heap.
>
> I think the oldest snapshot has to be on the bottom of the stack; how not?
Well, one might push a previously acuired (and registered) snapshot onto
the stack. Afaics that'll only happen if the snapshot is already
registered, but I'm not sure.