Re: sync rep and smart shutdown

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: sync rep and smart shutdown
Date: 2011-04-08 18:38:52
Message-ID: 15982.1302287932@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2011-04-08 18:40:03 Re: pg_upgrade bug found!
Previous Message Tom Lane 2011-04-08 18:27:15 Re: Open issues for collations