Prev: [HACKERS] HS/SR and smart shutdown
Next: plpython3 perf
From: Fujii Masao on 20 Jan 2010 20:40 On Thu, Jan 21, 2010 at 8:04 AM, Josh Berkus <josh(a)agliodbs.com> wrote: > I've been working on my demo, and I'm discovering that due to the > connection from the walsender and walreceiver, "smart" shutdown from > pg_ctl doesn't work if replication is active. > > This seems worth fixing; if we don't fix it, we should at least document it. > > Comments? Thanks for the report. Which servers (primary or standby) did you try a "smart" shutdown on? If it's "primary", could you show me the reproducible test set? At least in my box, a "smart" shutdown on the primary works fine. If it's "standby", it's a previously-existing behavior that a "smart" shutdown doesn't work immediately during recovery. After a recovery has been completed, it would work. Of course, I agree that such a behavior should be documented. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Josh Berkus on 20 Jan 2010 20:44 > If it's "standby", it's a previously-existing behavior that a "smart" > shutdown doesn't work immediately during recovery. After a recovery > has been completed, it would work. Of course, I agree that such a > behavior should be documented. Well, as long as streaming rep is running, you can't do a smart shutdown .... smart shutdown seems to treat the walreciever as a client connection. At the very least, this should be in the documentation. --Josh Berkus -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Robert Haas on 20 Jan 2010 20:52 On Wed, Jan 20, 2010 at 8:44 PM, Josh Berkus <josh(a)agliodbs.com> wrote: >> If it's "standby", it's a previously-existing behavior that a "smart" >> shutdown doesn't work immediately during recovery. After a recovery >> has been completed, it would work. Of course, I agree that such a >> behavior should be documented. > > Well, as long as streaming rep is running, you can't do a smart shutdown > ... smart shutdown seems to treat the walreciever as a client > connection. At the very least, this should be in the documentation. How hard is it to fix? ....Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 20 Jan 2010 20:56 Robert Haas <robertmhaas(a)gmail.com> writes: > On Wed, Jan 20, 2010 at 8:44 PM, Josh Berkus <josh(a)agliodbs.com> wrote: >> Well, as long as streaming rep is running, you can't do a smart shutdown >> ... smart shutdown seems to treat the walreciever as a client >> connection. �At the very least, this should be in the documentation. > How hard is it to fix? I think the first question is do we *want* to fix it, or is it appropriate behavior? If the master shuts down, will the slaves try to fail over to become masters? When the master restarts, will the slaves automatically reconnect? If these questions have the wrong answers, shutting down the master isn't something to be done lightly, and automatically disconnecting slaves would be a real bad idea. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Robert Haas on 20 Jan 2010 20:58
On Wed, Jan 20, 2010 at 8:56 PM, Tom Lane <tgl(a)sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas(a)gmail.com> writes: >> On Wed, Jan 20, 2010 at 8:44 PM, Josh Berkus <josh(a)agliodbs.com> wrote: >>> Well, as long as streaming rep is running, you can't do a smart shutdown >>> ... smart shutdown seems to treat the walreciever as a client >>> connection. At the very least, this should be in the documentation. > >> How hard is it to fix? > > I think the first question is do we *want* to fix it, or is it > appropriate behavior? > > If the master shuts down, will the slaves try to fail over to become > masters? When the master restarts, will the slaves automatically > reconnect? If these questions have the wrong answers, shutting down the > master isn't something to be done lightly, and automatically > disconnecting slaves would be a real bad idea. I thought the scenario in question was that someone wanted to manually shut down the slave. Am I misunderstanding? ....Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |