Re: sync rep and smart shutdown - Mailing list pgsql-hackers

From Tom Lane
Subject Re: sync rep and smart shutdown
Date
Msg-id 15982.1302287932@sss.pgh.pa.us
Whole thread Raw
In response to sync rep and smart shutdown  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: sync rep and smart shutdown  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> There is an open item for synchronous replication and smart shutdown,
> with a link to here:
> http://archives.postgresql.org/pgsql-hackers/2011-03/msg01391.php

> There are a couple of plausible ways to proceed here:

> 1. Do nothing.

> 2. When a smart shutdown is initiated, shut off synchronous
> replication.

> 3. Accept new replication connections even when the system is
> undergoing a smart shutdown.

I agree that #3 is impractical and #2 is a bad idea, which seems to
leave us with #1 (unless anyone has a #4)?  This is probably just
something we should figure is going to be one of the rough edges
in the first release of sync rep.

A #4 idea did just come to mind: once we realize that there are no
working replication connections, automatically do a fast shutdown
instead, ie, forcibly roll back those transactions that are never
gonna complete.  Or at least have the postmaster bleat about it.
But I'm not sure what it'd take to code that, and am also unsure
that it's something to undertake at this stage of the cycle.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Open issues for collations
Next
From: Stephen Frost
Date:
Subject: Re: pg_upgrade bug found!