Re: Standby server won't start

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: rajeev(dot)rastogi(at)huawei(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Standby server won't start
Date: 2014-03-21 10:47:17
Message-ID: 20140321.194717.2118352777058140927.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> I changed primary servers max_connections from 100 to 4 for just a
>> testing purpose. Now standby server won't start and complains:
>>
>> hot standby is not possible because max_connections = 4 is a lower
>> setting than on the master server (its value was 100)
>>
>> My guess is this is because standby's pg_control file contains previous
>> primary setting (max_connections = 100). Is there any way to start the
>> standby server without re-creating pg_control (which implies getting
>> base backup again)? If not, there should be some way to allow to start
>> standby server without getting base backup...
>
> I think there is no way to do this because parameter from master is already set
> in pg_control file, which can not be changed without taking new backup from master.

Yes, that's the problem.

> Also this is not recommended to have standby's max_connection values lesser than the master's max_connection value.

In my case I had already changed primary's max_connections to 4 and
restarted it. So at that point both postgresql.conf of primary and
standby were 4.

Maybe we could enhance it something like this:

1) When standby starts, it get max_connections info from primary and
updates pg_control file if it's different.

2) Then standby restarts itself if max_connections has been changed in #1.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rajeev rastogi 2014-03-21 11:20:22 Re: Standby server won't start
Previous Message Andrzej Mazurkiewicz 2014-03-21 10:32:56 Inheritance of foregn key constraints.