From: Fujii Masao on
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

> 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
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
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
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

 |  Next  |  Last
Pages: 1 2 3 4 5
Prev: [HACKERS] HS/SR and smart shutdown
Next: plpython3 perf