pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Small Bug in GetConflictingVirtualXIDs
Date: Mon, 21 Dec 2009 15:48:52 +0000
Message-ID: <1261410532.17644.3336.camel@ebony> (raw)
In-Reply-To: <15331.1261409887@sss.pgh.pa.us>
References: <200912210402.37850.andres@anarazel.de>
	<20091221152534.GB3913@alvh.no-ip.org>
	<15331.1261409887@sss.pgh.pa.us>

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




view thread (14+ messages)  latest in thread

Message-ID: <1261410532.17644.3336.camel@ebony>
Permalink:  ../1261410532.17644.3336.camel@ebony/
Also on:    postgresql.org/message-id/1261410532.17644.3336.camel@ebony

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: simon@2ndQuadrant.com, tgl@sss.pgh.pa.us, alvherre@commandprompt.com, andres@anarazel.de
  Subject: Re: Small Bug in GetConflictingVirtualXIDs
  In-Reply-To: <1261410532.17644.3336.camel@ebony>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox