Re: max_connections and standby server

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: max_connections and standby server
Date: 2015-08-11 06:00:07
Message-ID: CAB7nPqSKOdCh5Q2kDg=pZUdi2aT_gehQ=8JbMY+FJDVONOmJrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 11, 2015 at 2:57 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Tue, Aug 11, 2015 at 2:42 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
>>> I think this is because pg_control on the standby remembers that the
>>> previous primary server's max_connections = 1100 even if the standby
>>> server fails to start. Shouldn't we update pg_control file only when
>>> standby succeeds to start?
>>
>> Somebody refresh my memory as to why we have this restriction (that is,
>> slave's max_connections >= master's max_connections) in the first place?
>> Seems like it should not be a necessary requirement, and working towards
>> getting rid of it would be far better than any other answer.
>
> If I recall correctly, that's because KnownAssignedXIDs and the lock
> table need to be large enough on the standby for the largest snapshot
> possible (procarray.c).

... And the maximum number of locks possible on master (for the lock
table, wasn't it for the concurrent number of AccessExclusiveLocks,
btw?).
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2015-08-11 06:01:57 Re: Priority table or Cache table
Previous Message Michael Paquier 2015-08-11 05:57:46 Re: max_connections and standby server