Change query to use COUNT(*)

No point implying we're fetching the entire record
This commit is contained in:
Ian Barwick
2015-01-12 12:24:27 +09:00
parent 5fb84b9627
commit a5ead16d6f
2 changed files with 8 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
3.0beta1
Require PostgreSQL 9.3 or later (Ian)
Use `pg_basebackup` instead of `rsync` to clone standby servers (Ian)
Use `pg_ctl promote` to promote a standby to primary
Code consolidation and cleanup (Ian)
2.0.1 2014-07-16
Documentation fixes and new QUICKSTART file (Ian)
Explicitly specify directories to ignore when cloning (Ian)

View File

@@ -1275,14 +1275,13 @@ check_node_configuration(void)
char sqlquery[QUERY_STR_LEN];
/*
* Check if we have my node information in repl_nodes
* Check if this node has an entry in `repl_nodes`
*/
log_info(_("%s Checking node %d in cluster '%s'\n"),
progname, local_options.node, local_options.cluster_name);
// ZZZ change to COUNT(*) ???
sqlquery_snprintf(sqlquery,
"SELECT * "
"SELECT COUNT(*) "
" FROM %s.repl_nodes "
" WHERE id = %d "
" AND cluster = '%s' ",