Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf1022d

Browse files
committed
Fix thinko in multi-autovac-workers code: validity checks made by
GUC assign hooks are supposed to be made whether doit is true or not.
1 parent849ec99 commitaf1022d

File tree

1 file changed

+7
-11
lines changed
  • src/backend/utils/misc

1 file changed

+7
-11
lines changed

‎src/backend/utils/misc/guc.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.410 2007/08/04 19:29:25 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.411 2007/08/08 16:00:46 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -6956,27 +6956,23 @@ show_tcp_keepalives_count(void)
69566956
staticbool
69576957
assign_maxconnections(intnewval,booldoit,GucSourcesource)
69586958
{
6959-
if (doit)
6960-
{
6961-
if (newval+autovacuum_max_workers>INT_MAX /4)
6962-
return false;
6959+
if (newval+autovacuum_max_workers>INT_MAX /4)
6960+
return false;
69636961

6962+
if (doit)
69646963
MaxBackends=newval+autovacuum_max_workers;
6965-
}
69666964

69676965
return true;
69686966
}
69696967

69706968
staticbool
69716969
assign_autovacuum_max_workers(intnewval,booldoit,GucSourcesource)
69726970
{
6973-
if (doit)
6974-
{
6975-
if (newval+MaxConnections>INT_MAX /4)
6976-
return false;
6971+
if (newval+MaxConnections>INT_MAX /4)
6972+
return false;
69776973

6974+
if (doit)
69786975
MaxBackends=newval+MaxConnections;
6979-
}
69806976

69816977
return true;
69826978
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp