On Mon, 2009-12-21 at 10:38 -0500, Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Andres Freund wrote:
> >> The logic behind this seems fine except in the case of dropping a database.
> >> There you very well might have a open connection without an open snapshot.
>
> > Perhaps the simplest fix is to ensure that drop database gets a snapshot?
>
> I confess to not having followed the thread closely, but why is DROP
> DATABASE special in this regard? Wouldn't we soon find ourselves
> needing every utility command to take a snapshot?
Andres has worded this a little imprecisely, causing a confusion. In
cases regarding HS we need to be clear whether the interacting sessions
are on the master or on the standby to understand the reasons for poor
interactions.
What he means is that you can be connected to the standby without an
open snapshot (from the standby) at the point we replay a drop database
command that had been run on the master. That case currently causes the
bug, created by my recent change to GetConflictingVirtualXids().
Giving the drop database a snapshot is not the answer. I expect Andres
to be able to fix this with a simple patch that would not effect the
case of normal running.
-- Simon Riggs www.2ndQuadrant.com