提交 8df82d92 编写于 作者: H Heikki Linnakangas

Fix indentation, to silence compiler warning.

After commit f8a78c25, I started seeing this compiler warning:

check.c: In function ‘check_new_cluster’:
check.c:206:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if (user_opts.segment_mode == DISPATCHER)
     ^~
check.c:210:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
  check_for_prepared_transactions(&new_cluster);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix the indentation to use tabs instead of spaces, to silence that.

While we're at it, add an extra pair of braces, for clarity. I think
that's more clear, and Paul Guo also pointed at that in the original
review of the PR. This is in line of David Krieger's wish to keep the code
as close to upstream as possible.
上级 68f0d683
......@@ -198,15 +198,17 @@ check_new_cluster(void)
* error during pg_dump restore.
*
* However, in Greenplum, if we are upgrading a segment, its users have
* already been replicated to it from the master via gpupgrade. Hence,
* we only need to do this check for the QD. In other words, the
* Greenplum cluster upgrade scheme will overwrite the QE's schema
* already been replicated to it from the master via gpupgrade. Hence,
* we only need to do this check for the QD. In other words, the
* Greenplum cluster upgrade scheme will overwrite the QE's schema
* with the QD's schema, making this check inappropriate for a QE upgrade.
*/
if (user_opts.segment_mode == DISPATCHER)
if (new_cluster.role_count != 1)
pg_log(PG_FATAL, "Only the install user can be defined in the new cluster.\n");
*/
if (user_opts.segment_mode == DISPATCHER)
{
if (new_cluster.role_count != 1)
pg_log(PG_FATAL, "Only the install user can be defined in the new cluster.\n");
}
check_for_prepared_transactions(&new_cluster);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册