Skip site navigation (1) Skip section navigation (2)

Re: Error code for "terminating connection due to conflict with recovery"

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Bruce Momjian <bruce(at)momjian(dot)us>, fgp(at)phlo(dot)org, Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Error code for "terminating connection due to conflict with recovery"
Date: 2011-02-01 09:36:19
Message-ID: 1296552979.1779.8622.camel@ebony (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, 2011-02-01 at 07:35 +0100, Magnus Hagander wrote:
> On Tue, Feb 1, 2011 at 03:29, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > On Mon, Jan 31, 2011 at 8:52 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >>> Then again - in theory, there's no reason why we couldn't drop a
> >>> database on the master when it's in use, kicking out everyone using it
> >>> with this very same error code.  We don't happen to handle it that way
> >>> right now, but...
> >>
> >> Yeah, that was in the back of my mind too.  "DROP DATABASE foo FORCE",
> >> maybe?
> >
> > I have to think some people would find that useful.
> 
> Yes.
> 
> If nothing else, it would save some typing :-)

I like it also. It allows me to get rid of the concept of "non-retryable
recovery conflicts", so we just have one code path that works in both
normal mode and standby. Sweet.

Here's the basic patch, will work on the refactoring if no objections.

-- 
 Simon Riggs           http://www.2ndQuadrant.com/books/
 PostgreSQL Development, 24x7 Support, Training and Services
 

Attachment: drop_database_force.v1.patch
Description: text/x-patch (4.0 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Jeff DavisDate: 2011-02-01 09:56:38
Subject: Re: SSI patch version 14
Previous:From: Dave PageDate: 2011-02-01 08:47:58
Subject: Re: setlocale and gettext in Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group