Re: Small Bug in GetConflictingVirtualXIDs

From: Andres Freund <af(at)cybertec(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Small Bug in GetConflictingVirtualXIDs
Date: 2009-12-21 16:04:58
Message-ID: 200912211704.59321.af@cybertec.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Monday 21 December 2009 16:38:07 Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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?
Because most other "entities" are locked when you access them. So on the
standby the AccessExlusive (generated on the master) will conflict with
whatever lock you currently have on that entity (on the slave).
There are no locks for an idle session though.

Andres

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-12-21 16:22:54 Re: Minimum perl version supported
Previous Message Rafael Martinez 2009-12-21 15:51:14 Re: Table size does not include toast size