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

Appearance settings

Commit af1022d

Browse filesBrowse 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 parent 849ec99 commit af1022d
Copy full SHA for af1022d

File tree

Expand file treeCollapse file tree

1 file changed

+7
-11
lines changed
Filter options
  • src/backend/utils/misc
Expand file treeCollapse file tree

1 file changed

+7
-11
lines changed

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

Copy file name to clipboardExpand all lines: src/backend/utils/misc/guc.c
+7-11Lines 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
static bool
69576957
assign_maxconnections(int newval, bool doit, GucSource source)
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
static bool
69716969
assign_autovacuum_max_workers(int newval, bool doit, GucSource source)
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.