Why standby.max_connections must be higher than primary.max_connections?

From: 山田聡 <satoshi(dot)yamada(dot)pg(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Why standby.max_connections must be higher than primary.max_connections?
Date: 2013-12-10 08:34:56
Message-ID: CAAsiBbxRb+AAPKp8jdsWBnn+H3onB0m+bh8e2i1Y+a8dPccbTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Hello hackers. I am struggling to understand why standby.max_connections
must be higher than primary.max_connections.Do
<http://primary.max_connections.Do> someone know the reason why? I know
that standby cluster can not start if standby.max_connections is higher
than primary.max_connections.
http://www.postgresql.org/docs/9.3/static/hot-standby.html
<http://www.postgresql.org/docs/9.3/static/hot-standby.html> ------- The
setting of some parameters on the standby will need reconfiguration if they
have been changed on the primary. For these parameters, the value on the
standby must be equal to or greater than the value on the primary. If these
parameters are not set high enough then the standby will refuse to start.
Higher values can then be supplied and the server restarted to begin
recovery again. These parameters are: max_connections
max_prepared_transactions max_locks_per_transaction ------- I've also read
src/backend/access/transam/xlog.c. But there are no comments about a
reason. (I cannot find the reason,why standby.max_connections must be
higher than primary.max_connections.) I think this restriction obstructs
making a flexible load balancing. I'd like to make standby database to use
load balancing.Of course a role of a standby server is different from one
of a master server. So I think it it natural that I want to set
standby.max_connections less than primary.max_connections. thanks & regards*

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru Hanada 2013-12-10 09:05:10 Re: Custom Scan APIs (Re: Custom Plan node)
Previous Message Albe Laurenz 2013-12-10 08:28:23 Re: ANALYZE sampling is too good