From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Parameter name standby_mode |
Date: | 2010-03-31 03:21:42 |
Message-ID: | p2n603c8f071003302021vc4bbe94eu7beee4766b2df5d4@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 30, 2010 at 12:26 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Mar 3, 2010 at 9:41 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> On Wed, Feb 24, 2010 at 2:18 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>> If standby_mode is enabled, and neither primary_conninfo nor restore_command
>>> are set, the standby would get stuck. How about forbidding (i.e., causing a
>>> FATAL message) this wrong setting?
>>
>> Here is the patch which forbids that wrong setting of recovery.conf.
>
> I think that this patch should be applied. Otherwise, if you wrongly
> set neither primary_conninfo nor restore_command in recovery.conf,
> the standby server would do nothing and get stuck because it doesn't
> know where to retrieve the WAL files from. Banning the incorrect
> setting makes sense to me.
>
> Does anyone commit the patch? Does anyone have a say?
I just tested this and it seems to just sit there doing this over and
over again:
LOG: record with zero length at 0/3006B28
I'm not sure that we should forbid this configuration, but the current
behavior doesn't seem right either. ISTM that, in the absence of a
way to get any more WAL, it would be reasonable for the standby server
to just start up and sit there in recovery mode but without actually
advancing recovery, but the repeated log messages are pretty annoying.
If we're connected in streaming mode and there is no activity on the
primary, we don't emit logs of this type, so it doesn't seem like we
should do that if there is no primary either.
A related question is... do we ever reload recovery.conf? I tried
adding the setting to recovery.conf and doing pg_ctl reload, and it
says that it's "reloading configuration files", but doesn't pick up
the new setting. :-(
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2010-03-31 04:54:44 | Re: sorry, too many standbys already vs. MaxWalSenders vs. max_wal_senders |
Previous Message | Robert Haas | 2010-03-31 03:10:18 | Re: pending patch: Re: HS/SR and smart shutdown |