pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #7858: Inaccurate Log Message
2+ messages / 2 participants
[nested] [flat]

* BUG #7858: Inaccurate Log Message
@ 2013-02-08 06:46  jackie.qq.zhang@gmail.com
  0 siblings, 1 reply; 2+ messages in thread

From: jackie.qq.zhang@gmail.com @ 2013-02-08 06:46 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      7858
Logged by:          Jackie Zhang
Email address:      jackie.qq.zhang@gmail.com
PostgreSQL version: 9.1.4
Operating system:   Ubuntu
Description:        

Hi,

The log message of the sanity check for "superuser_reserved_connections" in
PostmasterMain() is not accurate. See the following code snippet:

/*src/backend/postmaster/postmaster.c*/
 730         /*
 731          * Check for invalid combinations of GUC settings.
 732          */
 733         if (ReservedBackends >= MaxBackends)
 734         {
 735                 write_stderr("%s: superuser_reserved_connections must
be less than max_connections\n", progname);
 736                 ExitPostmaster(1);
 737         }

The problem is that "MaxBackends" is calculated by both
"autovacuum_max_workers" and "max_connections". See assign_maxconnections()
and assign_autovacuum_max_workers() in src/backend/utils/misc/guc.c.

The log message should inform both the two configuration parameters instead
of only one -- the root cause could be the oversized
"autovacuum_max_workers".

Thanks,
Jackie





-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #7858: Inaccurate Log Message
@ 2013-09-10 23:57  Bruce Momjian <bruce@momjian.us>
  parent: jackie.qq.zhang@gmail.com
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2013-09-10 23:57 UTC (permalink / raw)
  To: jackie.qq.zhang@gmail.com; +Cc: pgsql-bugs

On Fri, Feb  8, 2013 at 06:46:29AM +0000, jackie.qq.zhang@gmail.com wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      7858
> Logged by:          Jackie Zhang
> Email address:      jackie.qq.zhang@gmail.com
> PostgreSQL version: 9.1.4
> Operating system:   Ubuntu
> Description:        
> 
> Hi,
> 
> The log message of the sanity check for "superuser_reserved_connections" in
> PostmasterMain() is not accurate. See the following code snippet:
> 
> /*src/backend/postmaster/postmaster.c*/
>  730         /*
>  731          * Check for invalid combinations of GUC settings.
>  732          */
>  733         if (ReservedBackends >= MaxBackends)
>  734         {
>  735                 write_stderr("%s: superuser_reserved_connections must
> be less than max_connections\n", progname);
>  736                 ExitPostmaster(1);
>  737         }
> 
> The problem is that "MaxBackends" is calculated by both
> "autovacuum_max_workers" and "max_connections". See assign_maxconnections()
> and assign_autovacuum_max_workers() in src/backend/utils/misc/guc.c.
> 
> The log message should inform both the two configuration parameters instead
> of only one -- the root cause could be the oversized
> "autovacuum_max_workers".

The calculation, ReservedBackends >= MaxBackends, was corrected in
Postgres 9.3 with this commit:

	commit b3055ab4fb5839a872bfe354b2b5ac31e6903ed6
	Author: Magnus Hagander <magnus@hagander.net>
	Date:   Fri Aug 10 14:49:03 2012 +0200
	
	    Fix upper limit of superuser_reserved_connections, add limit for wal_senders
	
	    Should be limited to the maximum number of connections excluding
	    autovacuum workers, not including.
	
	    Add similar check for max_wal_senders, which should never be higher than
	    max_connections.


-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2013-09-10 23:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-02-08 06:46 BUG #7858: Inaccurate Log Message jackie.qq.zhang@gmail.com
2013-09-10 23:57 ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox