pgpool2.git / summary / log / commit / refs
commit bc8d2e610ce114f9602242524126e76ba6a797e2
Author: Yugo Nagata <nagata@sraoss.co.jp>
Date: Thu May 23 06:55:01 2013 +0000
Fix typos of comments & log messages.
child.c | 18 +++++++-------
main.c | 26 ++++++++++----------
parser/pool_memory.c | 4 ++--
pcp/libpcp_ext.h | 4 ++--
pcp/pcp.c | 4 ++--
pcp/pcp.h | 2 +-
pcp/pcp_stream.c | 4 ++--
pool.h | 6 ++---
pool_auth.c | 20 ++++++++--------
pool_config.h | 20 ++++++++--------
pool_config.l | 10 ++++----
pool_connection_pool.c | 2 +-
pool_globals.c | 2 +-
pool_memqcache.c | 64 ++++++++++++++++++++++++-------------------------
pool_memqcache.h | 12 +++++-----
pool_params.c | 2 +-
pool_passwd.c | 4 ++--
pool_proto_modules.c | 24 +++++++++----------
pool_proto_modules.h | 2 +-
pool_query_cache.c | 8 +++----
pool_query_context.c | 16 ++++++-------
pool_relcache.c | 2 +-
pool_rewrite_query.c | 6 ++---
pool_rewrite_query.h | 38 ++++++++++++++---------------
pool_select_walker.c | 4 ++--
pool_session_context.c | 4 ++--
pool_session_context.h | 6 ++---
pool_stream.c | 8 +++----
pool_timestamp.c | 4 ++--
pool_worker_child.c | 2 +-
watchdog/watchdog.h | 6 ++---
watchdog/wd_child.c | 12 +++++-----
watchdog/wd_heartbeat.c | 4 ++--
watchdog/wd_interlock.c | 4 ++--
watchdog/wd_list.c | 4 ++--
watchdog/wd_packet.c | 6 ++---
watchdog/wd_ping.c | 8 +++----
37 files changed, 186 insertions(+), 186 deletions(-)
diff --git a/child.c b/child.c
index 6f6f4e174..e7c15d0ea 100644
--- a/child.c
+++ b/child.c
@@ -276,7 +276,7 @@ void do_child(int unix_fd, int inet_fd)
}
/*
- * Ok, negotiaton with frontend has been done. Let's go to the
+ * Ok, negotiation with frontend has been done. Let's go to the
* next step. Connect to backend if there's no existing
* connection which can be reused by this frontend.
* Authentication is also done in this step.
@@ -360,7 +360,7 @@ void do_child(int unix_fd, int inet_fd)
*/
pool_init_session_context(frontend, backend);
- /* Mark this connection pool is conncted from frontend */
+ /* Mark this connection pool is connected from frontend */
pool_coninfo_set_frontend_connected(pool_get_process_context()->proc_id, pool_pool_index());
/* query process loop */
@@ -414,14 +414,14 @@ void do_child(int unix_fd, int inet_fd)
}
break;
- /* error occured. discard backend connection pool
+ /* error occurred. discard backend connection pool
and disconnect connection to the frontend */
case POOL_ERROR:
pool_log("do_child: exits with status 1 due to error");
child_exit(1);
break;
- /* fatal error occured. just exit myself... */
+ /* fatal error occurred. just exit myself... */
case POOL_FATAL:
notice_backend_error(1);
child_exit(1);
@@ -444,7 +444,7 @@ void do_child(int unix_fd, int inet_fd)
/* Destroy session context */
pool_session_context_destroy();
- /* Mark this connection pool is not conncted from frontend */
+ /* Mark this connection pool is not connected from frontend */
pool_coninfo_unset_frontend_connected(pool_get_process_context()->proc_id, pool_pool_index());
accepted = 0;
@@ -533,7 +533,7 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time
/*
* following code fragment computes remaining timeout val in a
- * portable way. Linux does this automazically but other platforms do not.
+ * portable way. Linux does this automatically but other platforms do not.
*/
if (timeoutval)
{
@@ -797,7 +797,7 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time
return NULL;
}
- /* save ip addres for hba */
+ /* save ip address for hba */
memcpy(&cp->raddr, &saddr, sizeof(SockAddr));
if (cp->raddr.addr.ss_family == 0)
cp->raddr.addr.ss_family = AF_UNIX;
@@ -1179,7 +1179,7 @@ void cancel_request(CancelPacket *sp)
pool_close(con);
/*
- * this is needed to enure that the next DB node executes the
+ * this is needed to ensure that the next DB node executes the
* query supposed to be canceled.
*/
sleep(1);
@@ -1749,7 +1749,7 @@ static int s_do_auth(POOL_CONNECTION_POOL_SLOT *cp, char *password)
}
/*
- * Read backend key data and wait until Reay for query arriving or
+ * Read backend key data and wait until Ready for query arriving or
* error happens.
*/
diff --git a/main.c b/main.c
index dac239fa4..61b6ce91b 100644
--- a/main.c
+++ b/main.c
@@ -162,7 +162,7 @@ static char hba_file[POOLMAXPATHLEN+1];
static int exiting = 0; /* non 0 if I'm exiting */
static int switching = 0; /* non 0 if I'm fail overing or degenerating */
-static int clear_cache = 0; /* non 0 if clear chache option (-c) is given */
+static int clear_cache = 0; /* non 0 if clear cache option (-c) is given */
static int not_detach = 0; /* non 0 if non detach option (-n) is given */
static int stop_sig = SIGTERM; /* stopping signal default value */
@@ -514,7 +514,7 @@ int main(int argc, char **argv)
con_info = pool_shared_memory_create(size);
if (con_info == NULL)
{
- pool_error("failed to allocate connection informations");
+ pool_error("failed to allocate connection information");
myexit(1);
}
memset(con_info, 0, size);
@@ -747,7 +747,7 @@ int main(int argc, char **argv)
{
if (POOL_DISALLOW_TO_FAILOVER(BACKEND_INFO(sts).flag))
{
- pool_log("health_check: %d failover is canceld because failover is disallowed", sts);
+ pool_log("health_check: %d failover is canceled because failover is disallowed", sts);
}
else if (retrycnt <= pool_config->health_check_max_retries)
{
@@ -826,7 +826,7 @@ int main(int argc, char **argv)
if (pool_config->health_check_timeout > 0)
{
- /* seems ok. cancel health check timer */
+ /* seems OK. cancel health check timer */
pool_signal(SIGALRM, SIG_IGN);
}
@@ -1484,7 +1484,7 @@ void degenerate_backend_set(int *node_id_set, int count)
if (POOL_DISALLOW_TO_FAILOVER(BACKEND_INFO(node_id_set[i]).flag))
{
- pool_log("degenerate_backend_set: %d failover request from pid %d is canceld because failover is disallowed", node_id_set[i], getpid());
+ pool_log("degenerate_backend_set: %d failover request from pid %d is canceled because failover is disallowed", node_id_set[i], getpid());
continue;
}
@@ -1912,7 +1912,7 @@ static void failover(void)
/* On 2011/5/2 Tatsuo Ishii says: if mode is streaming replication
* and request is NODE_UP_REQUEST(failback case) we don't need to
* restart all children. Existing session will not use newly
- * attached node, but load balanced node is not changed util this
+ * attached node, but load balanced node is not changed until this
* session ends, so it's harmless anyway.
*/
if (MASTER_SLAVE && !strcmp(pool_config->master_slave_sub_mode, MODE_STREAMREP) &&
@@ -2131,7 +2131,7 @@ static void failover(void)
continue;
else
{
- pool_error("failover: waitpid failed. reson: %s", strerror(errno));
+ pool_error("failover: waitpid failed. reason: %s", strerror(errno));
return;
}
}
@@ -2158,7 +2158,7 @@ static RETSIGTYPE health_check_timer_handler(int sig)
/*
* Check if we can connect to the backend
- * returns 0 for ok. otherwise returns backend id + 1
+ * returns 0 for OK. otherwise returns backend id + 1
*/
static int health_check(void)
{
@@ -2240,7 +2240,7 @@ static int health_check(void)
/*
* check if we can connect to the SystemDB
- * returns 0 for ok. otherwise returns -1
+ * returns 0 for OK. otherwise returns -1
*/
static int
system_db_health_check(void)
@@ -2559,7 +2559,7 @@ static void kill_all_children(int sig)
* recovery processing) or config file reload request(SIGHUP) has been
* occurred. In this case this function returns 1.
* otherwise 0: (no signal event occurred), -1: (error)
- * XXX: is it ok that select(2) error is ignored here?
+ * XXX: is it OK that select(2) error is ignored here?
*/
static int pool_pause(struct timeval *timeout)
{
@@ -2697,7 +2697,7 @@ static int trigger_failover_command(int node, const char *command_line,
if (newmaster)
string_append_char(exec_cmd, newmaster->backend_hostname);
else
- /* no vaid new master */
+ /* no valid new master */
string_append_char(exec_cmd, "");
break;
@@ -2714,7 +2714,7 @@ static int trigger_failover_command(int node, const char *command_line,
string_append_char(exec_cmd, port_buf);
}
else
- /* no vaid new master */
+ /* no valid new master */
string_append_char(exec_cmd, "");
break;
@@ -2723,7 +2723,7 @@ static int trigger_failover_command(int node, const char *command_line,
if (newmaster)
string_append_char(exec_cmd, newmaster->backend_data_directory);
else
- /* no vaid new master */
+ /* no valid new master */
string_append_char(exec_cmd, "");
break;
diff --git a/parser/pool_memory.c b/parser/pool_memory.c
index f53ce688e..ab59f6bed 100644
--- a/parser/pool_memory.c
+++ b/parser/pool_memory.c
@@ -174,7 +174,7 @@ void pool_memory_free(POOL_MEMORY_POOL *pool, void *ptr)
if (block == NULL)
{
- pool_log("An adress \"%p\" does not exist in memory pool.", chunk);
+ pool_log("An address \"%p\" does not exist in memory pool.", chunk);
return;
}
@@ -331,7 +331,7 @@ char *pool_memory_strdup(POOL_MEMORY_POOL *pool_memory, const char *string)
}
/*
- * Switch memory context from pool_meory to pm
+ * Switch memory context from pool_memory to pm
*/
POOL_MEMORY_POOL *pool_memory_context_switch_to(POOL_MEMORY_POOL *pm)
{
diff --git a/pcp/libpcp_ext.h b/pcp/libpcp_ext.h
index 84fca6156..4613f08e7 100644
--- a/pcp/libpcp_ext.h
+++ b/pcp/libpcp_ext.h
@@ -117,7 +117,7 @@ typedef struct {
char *table_name; /* table name */
char *dist_key_col_name;/* column name for dist key */
int dist_key_col_id; /* column index id for dist key */
- int col_num; /* number of clumn*/
+ int col_num; /* number of column*/
char **col_list; /* column list */
char **type_list; /* type list */
char *dist_def_func; /* function name of distribution rule */
@@ -129,7 +129,7 @@ typedef struct {
char *dbname; /* database name */
char *schema_name; /* schema name */
char *table_name; /* table name */
- int col_num; /* number of clumn*/
+ int col_num; /* number of column*/
char **col_list; /* column list */
char **type_list; /* type list */
char *prepare_name; /* prepared statement name */
diff --git a/pcp/pcp.c b/pcp/pcp.c
index d82352cf7..997fddf0d 100644
--- a/pcp/pcp.c
+++ b/pcp/pcp.c
@@ -1094,7 +1094,7 @@ free_systemdb_info(SystemDBInfo * si)
}
/* --------------------------------
- * pcp_detach_node - dettach a node given by the argument from pgpool's control
+ * pcp_detach_node - detach a node given by the argument from pgpool's control
*
* return 0 on success, -1 otherwise
* --------------------------------
@@ -1107,7 +1107,7 @@ pcp_detach_node(int nid)
/* --------------------------------
- * and dettach a node given by the argument from pgpool's control
+ * and detach a node given by the argument from pgpool's control
*
* return 0 on success, -1 otherwise
* --------------------------------
diff --git a/pcp/pcp.h b/pcp/pcp.h
index e8236523b..6196b5295 100644
--- a/pcp/pcp.h
+++ b/pcp/pcp.h
@@ -41,7 +41,7 @@ typedef enum {
SOCKERR, /* thrown by socket() or setsockopt() */
HOSTERR, /* thrown by gethostbyname() */
BACKENDERR, /* server dependent error */
- AUTHERR /* authorization faiure */
+ AUTHERR /* authorization failure */
} ErrorCode;
/* --------------------------------
diff --git a/pcp/pcp_stream.c b/pcp/pcp_stream.c
index 2b17aebfd..d3e6b6fdc 100644
--- a/pcp/pcp_stream.c
+++ b/pcp/pcp_stream.c
@@ -37,7 +37,7 @@ static int save_pending_data(PCP_CONNECTION *pc, void *data, int len);
static int pcp_check_fd(PCP_CONNECTION *pc, int notimeout);
/* --------------------------------
- * pcp_open - allocate read & write buffers for PCP_CONNECION
+ * pcp_open - allocate read & write buffers for PCP_CONNECTION
*
* return newly allocated PCP_CONNECTION on success, NULL if malloc() fails
* --------------------------------
@@ -79,7 +79,7 @@ pcp_open(int fd)
}
/* --------------------------------
- * pcp_close - deallocate read & write buffers for PCP_CONNECION
+ * pcp_close - deallocate read & write buffers for PCP_CONNECTION
* --------------------------------
*/
void
diff --git a/pool.h b/pool.h
index 6af1a3f26..f90964a7a 100644
--- a/pool.h
+++ b/pool.h
@@ -125,7 +125,7 @@ typedef struct
typedef struct CancelPacket
{
int protoVersion; /* Protocol version */
- int pid; /* bcckend process id */
+ int pid; /* backend process id */
int key; /* cancel key */
} CancelPacket;
@@ -188,7 +188,7 @@ typedef struct {
char salt[4]; /* password salt */
/*
- * following are used to remember current session paramter status.
+ * following are used to remember current session parameter status.
* re-used connection will need them (V3 only)
*/
ParamStatus params;
@@ -380,7 +380,7 @@ typedef struct {
/* description of row. corresponding to RowDescription message */
typedef struct {
char *attrname; /* attribute name */
- int oid; /* 0 or non 0 if it's a table oblect */
+ int oid; /* 0 or non 0 if it's a table object */
int attrnumber; /* attribute number starting with 1. 0 if it's not a table */
int typeoid; /* data type oid */
int size; /* data length minus means variable data type */
diff --git a/pool_auth.c b/pool_auth.c
index d14fa41c4..999ee1501 100644
--- a/pool_auth.c
+++ b/pool_auth.c
@@ -18,7 +18,7 @@
* suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
- * pool_auth.c: authenticaton stuff
+ * pool_auth.c: authentication stuff
*
*/
@@ -513,7 +513,7 @@ static POOL_STATUS pool_send_backend_key_data(POOL_CONNECTION *frontend, int pid
}
/*
- * perform clear text password authetication
+ * perform clear text password authentication
*/
static int do_clear_text_password(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reauth, int protoMajor)
{
@@ -526,7 +526,7 @@ static int do_clear_text_password(POOL_CONNECTION *backend, POOL_CONNECTION *fro
/* master? */
if (IS_MASTER_NODE_ID(backend->db_node_id))
{
- pool_write(frontend, "R", 1); /* authenticaton */
+ pool_write(frontend, "R", 1); /* authentication */
if (protoMajor == PROTO_MAJOR_V3)
{
len = htonl(8);
@@ -583,13 +583,13 @@ static int do_clear_text_password(POOL_CONNECTION *backend, POOL_CONNECTION *fro
{
if ((ntohl(size) - 4) != backend->pwd_size)
{
- pool_debug("do_clear_text_password; password size does not match in re-authetication");
+ pool_debug("do_clear_text_password; password size does not match in re-authentication");
return -1;
}
if (memcmp(password, backend->password, backend->pwd_size) != 0)
{
- pool_debug("do_clear_text_password; password does not match in re-authetication");
+ pool_debug("do_clear_text_password; password does not match in re-authentication");
return -1;
}
@@ -665,7 +665,7 @@ static int do_clear_text_password(POOL_CONNECTION *backend, POOL_CONNECTION *fro
}
/*
- * perform crypt authetication
+ * perform crypt authentication
*/
static int do_crypt(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reauth, int protoMajor)
{
@@ -693,7 +693,7 @@ static int do_crypt(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int rea
/* master? */
if (IS_MASTER_NODE_ID(backend->db_node_id))
{
- pool_write(frontend, "R", 1); /* authenticaton */
+ pool_write(frontend, "R", 1); /* authentication */
if (protoMajor == PROTO_MAJOR_V3)
{
len = htonl(10);
@@ -832,7 +832,7 @@ static int do_crypt(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int rea
}
/*
- * perform MD5 authetication
+ * perform MD5 authentication
*/
static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reauth, int protoMajor)
{
@@ -1012,7 +1012,7 @@ static int send_md5auth_request(POOL_CONNECTION *frontend, int protoMajor, char
int len;
int kind;
- pool_write(frontend, "R", 1); /* authenticaton */
+ pool_write(frontend, "R", 1); /* authentication */
if (protoMajor == PROTO_MAJOR_V3)
{
len = htonl(12);
@@ -1092,7 +1092,7 @@ static int read_password_packet(POOL_CONNECTION *frontend, int protoMajor, char
/*
* Send password packet to backend and receive authentication response
* packet. Return value is the last field of authentication
- * response. If it's 0, authentication was successfull.
+ * response. If it's 0, authentication was successful.
* "password" must be null-terminated.
*/
static int send_password_packet(POOL_CONNECTION *backend, int protoMajor, char *password)
diff --git a/pool_config.h b/pool_config.h
index 425fd7f6b..d56d785cd 100644
--- a/pool_config.h
+++ b/pool_config.h
@@ -65,7 +65,7 @@ typedef struct {
#define POOL_ALLOW_TO_FAILOVER(x) (!(POOL_DISALLOW_TO_FAILOVER(x)))
/*
- * configuration paramters
+ * configuration parameters
*/
typedef struct {
char *listen_addresses; /* hostnames/IP addresses to listen on */
@@ -98,19 +98,19 @@ typedef struct {
int load_balance_mode; /* load balance mode */
int replication_stop_on_mismatch; /* if there's a data mismatch between master and secondary
- * start degenration to stop replication mode
+ * start degeneration to stop replication mode
*/
/* If there's a disagreement with the number of affected tuples in
- * UPDATE/DELETE, then degenrate the node which is most likely
+ * UPDATE/DELETE, then degenerate the node which is most likely
* "minority". # If false, just abort the transaction to keep the
* consistency.*/
int failover_if_affected_tuples_mismatch;
int replicate_select; /* if non 0, replicate SELECT statement when load balancing is disabled. */
- char **reset_query_list; /* comma separated list of quries to be issued at the end of session */
- char **white_function_list; /* list of functions with no side effetcs */
- char **black_function_list; /* list of functions with side effetcs */
+ char **reset_query_list; /* comma separated list of queries to be issued at the end of session */
+ char **white_function_list; /* list of functions with no side effects */
+ char **black_function_list; /* list of functions with side effects */
int print_timestamp; /* if non 0, print time stamp to each log line */
int master_slave_mode; /* if non 0, operate in master/slave mode */
char *master_slave_sub_mode; /* either "slony" or "stream" */
@@ -127,7 +127,7 @@ typedef struct {
char *health_check_password; /* password for health check username */
int health_check_max_retries; /* health check max retries */
int health_check_retry_delay; /* amount of time to wait between retries */
- int sr_check_period; /* streming replication check period */
+ int sr_check_period; /* streaming replication check period */
char *sr_check_user; /* PostgreSQL user name streaming replication check */
char *sr_check_password; /* password for sr_check_user */
char *failover_command; /* execute command when failover happens */
@@ -149,7 +149,7 @@ typedef struct {
int recovery_timeout; /* maximum time in seconds to wait for remote start-up */
int client_idle_limit_in_recovery; /* If > 0, the client is forced to be
* disconnected after n seconds idle
- * This parameter is only valid while in recovery 2nd statge */
+ * This parameter is only valid while in recovery 2nd stage */
int insert_lock; /* if non 0, automatically lock table with INSERT to keep SERIAL
data consistency */
int ignore_leading_white_space; /* ignore leading white spaces of each query */
@@ -205,7 +205,7 @@ typedef struct {
int memory_cache_enabled; /* if true, use the memory cache functionality, false by default */
char *memqcache_method; /* Cache store method. Either 'shmem'(shared memory) or 'memcached'. 'shmem' by default */
char *memqcache_memcached_host; /* Memcached host name. Mandatory if memqcache_method=memcached. */
- int memqcache_memcached_port; /* Memcached port number. Mondatory if memqcache_method=memcached. */
+ int memqcache_memcached_port; /* Memcached port number. Mandatory if memqcache_method=memcached. */
int memqcache_total_size; /* Total memory size in bytes for storing memory cache. Mandatory if memqcache_method=shmem. */
int memqcache_max_num_cache; /* Total number of cache entries. Mandatory if memqcache_method=shmem. */
int memqcache_expire; /* Memory cache entry life time specified in seconds. 60 by default. */
@@ -214,7 +214,7 @@ typedef struct {
/* by memqcache_expire. True by default. */
int memqcache_maxcache; /* Maximum SELECT result size in bytes. */
int memqcache_cache_block_size; /* Cache block size in bytes. 8192 by default */
- char *memqcache_oiddir; /* Tempory work directory to record table oids */
+ char *memqcache_oiddir; /* Temporary work directory to record table oids */
char **white_memqcache_table_list; /* list of tables to memqcache */
char **black_memqcache_table_list; /* list of tables not to memqcache */
diff --git a/pool_config.l b/pool_config.l
index a43d400d7..0b8e471ec 100644
--- a/pool_config.l
+++ b/pool_config.l
@@ -241,7 +241,7 @@ int pool_init_config(void)
res = gethostname(localhostname,sizeof(localhostname));
if(res !=0 )
{
- pool_debug("faild to get this hostname");
+ pool_debug("failed to get this hostname");
}
pool_config->wd_hostname = localhostname;
pool_config->wd_port = 9000;
@@ -286,7 +286,7 @@ int pool_init_config(void)
res = gethostname(localhostname,sizeof(localhostname));
if(res !=0 )
{
- pool_debug("faild to get this hostname");
+ pool_debug("failed to get this hostname");
}
pool_config->pgpool2_hostname = localhostname;
@@ -2812,7 +2812,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context)
total_weight += BACKEND_INFO(i).unnormalized_weight;
pool_config->backend_desc->num_backends = i+1;
- /* intialize backend_hostname with a default socket path if empty */
+ /* initialize backend_hostname with a default socket path if empty */
if (*(BACKEND_INFO(i).backend_hostname) == '\0')
{
if (pool_config->backend_socket_dir == NULL)
@@ -2832,7 +2832,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context)
pool_debug("num_backends: %d total_weight: %f",
pool_config->backend_desc->num_backends, total_weight);
/*
- * Normalize load balacing weights. What we are doing here is,
+ * Normalize load balancing weights. What we are doing here is,
* assign 0 to RAND_MAX to each backend's weight according to the
* value weightN. For example, if two backends are assigned 1.0,
* then each backend will get RAND_MAX/2 normalized weight.
@@ -2862,7 +2862,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context)
system_db_info = malloc(sizeof(POOL_SYSTEMDB_CONNECTION_POOL));
if (system_db_info == NULL)
{
- pool_error("failed to allocate sytem_db_info");
+ pool_error("failed to allocate system_db_info");
return -1;
}
memset(system_db_info, 0, sizeof(*system_db_info));
diff --git a/pool_connection_pool.c b/pool_connection_pool.c
index bb256588a..a6b6a06ef 100644
--- a/pool_connection_pool.c
+++ b/pool_connection_pool.c
@@ -189,7 +189,7 @@ void pool_discard_cp(char *user, char *database, int protoMajor)
if (p == NULL)
{
- pool_error("pool_discard_cp: cannot get connection pool for user %s datbase %s", user, database);
+ pool_error("pool_discard_cp: cannot get connection pool for user %s database %s", user, database);
return;
}
diff --git a/pool_globals.c b/pool_globals.c
index 2ff50f7a3..7da658e70 100644
--- a/pool_globals.c
+++ b/pool_globals.c
@@ -18,7 +18,7 @@
* suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
- * Global varibles. Should be eventually removed.
+ * Global variables. Should be eventually removed.
*/
#include "pool.h"
diff --git a/pool_memqcache.c b/pool_memqcache.c
index 65d7f97fe..b4096b672 100644
--- a/pool_memqcache.c
+++ b/pool_memqcache.c
@@ -337,7 +337,7 @@ static int pool_fetch_cache(POOL_CONNECTION_POOL *backend, const char *query, ch
{
pool_error("pool_fetch_cache: memcached_get failed %s", memcached_strerror(memc, rc));
/*
- * Turn off memory cache support to prevent future erros.
+ * Turn off memory cache support to prevent future errors.
*/
pool_config->memory_cache_enabled = 0;
/* Behave as if cache not found */
@@ -582,7 +582,7 @@ POOL_STATUS pool_fetch_from_memory_cache(POOL_CONNECTION *frontend,
/*
* If we are doing extended query, wait and discard Sync
- * message from frontend. This is neccessary to prevent
+ * message from frontend. This is necessary to prevent
* receiving Sync message after Sending Ready for query.
*/
if (pool_is_doing_extended_query_message())
@@ -731,7 +731,7 @@ bool pool_is_allow_to_cache(Node *node, char *query)
SelectContext ctx;
/*
- * If NO QUERY CACHE coment exists, do not cache.
+ * If NO QUERY CACHE comment exists, do not cache.
*/
if (!strncasecmp(query, NO_QUERY_CACHE, NO_QUERY_CACHE_COMMENT_SZ))
return false;
@@ -1225,7 +1225,7 @@ int pool_get_database_oid_from_dbname(char *dbname)
/*
* Add cache id(shmem case) or hash key(memcached case) to table oid
* map file. Caller must hold shmem lock before calling this function
- * to avoid file extention conflict among different pgpool child
+ * to avoid file extension conflict among different pgpool child
* process.
* As of pgpool-II 3.2, pool_handle_query_cache is responsible for that.
* (pool_handle_query_cache -> pool_commit_cache -> pool_add_table_oid_map)
@@ -1318,7 +1318,7 @@ static void pool_add_table_oid_map(POOL_CACHEKEY *cachekey, int num_table_oids,
/*
* Below was ifdef-out because of a performance reason.
* Looking for duplicate cache entries in a file needed
- * unacceptably high cost. So we gave up this and decieded not
+ * unacceptably high cost. So we gave up this and decided not
* to care about duplicate entries in the file.
*/
#ifdef NOT_USED
@@ -1380,7 +1380,7 @@ static void pool_add_table_oid_map(POOL_CACHEKEY *cachekey, int num_table_oids,
/*
* Discard all oid maps at pgpool-II startup.
- * This is neccessary for shmem case.
+ * This is necessary for shmem case.
*/
void pool_discard_oid_maps(void)
{
@@ -1407,7 +1407,7 @@ void pool_discard_oid_maps_by_db(int dboid)
/*
* Reading cache id(shmem case) or hash key(memcached case) from table
* oid map file according to table_oids and discard cache entries. If
- * unlink is true, the file will be unlinked after successfull cache
+ * unlink is true, the file will be unlinked after successful cache
* removal.
*/
static void pool_invalidate_query_cache(int num_table_oids, int *table_oid, bool unlinkp, int dboid)
@@ -1607,7 +1607,7 @@ bool pool_is_shmem_cache(void)
}
/*
- * Remeber memory cache number of blocks.
+ * Remember memory cache number of blocks.
*/
static int memqcache_num_blocks;
static void pool_set_memqcache_blocks(int num_blocks)
@@ -1653,14 +1653,14 @@ size_t pool_shared_memory_cache_size(void)
pool_log("pool_shared_memory_cache_size: number of blocks: %d", num_blocks);
- /* Remenber # of blocks */
+ /* Remember # of blocks */
pool_set_memqcache_blocks(num_blocks);
size = pool_config->memqcache_cache_block_size * num_blocks;
return size;
}
/*
- * Aquire and initialize shared memory cache. This should be called
+ * Acquire and initialize shared memory cache. This should be called
* only once from pgpool main process at the process staring up time.
*/
static void *shmem;
@@ -1723,9 +1723,9 @@ static void *pool_memory_cache_address(void)
*
* Free space management map (FSMM) consists of bytes. Each byte
* corresponds to block id. For example, if you have 1GB cache and
- * block size is 8Kb, number of blocks = 131,072, thus total sizeo of
+ * block size is 8Kb, number of blocks = 131,072, thus total size of
* FSMM is 128Kb. Each FSMM entry has value from 0 to 255. Those
- * valus describes total free space in each block.
+ * values describes total free space in each block.
* For example, if the value is 2, the free space can be between 64
* bytes and 95 bytes.
*
@@ -1751,9 +1751,9 @@ size_t pool_shared_memory_fsmm_size(void)
}
/*
- * Aquire and initialize shared memory cache for FSMM. This should be
+ * Acquire and initialize shared memory cache for FSMM. This should be
* called after pool_shared_memory_cache_size only once from pgpool
- * main process at the proces staring up time.
+ * main process at the process staring up time.
*/
static void *fsmm;
int pool_init_fsmm(size_t size)
@@ -1936,7 +1936,7 @@ static void pool_update_fsmm(POOL_CACHE_BLOCKID blockid, size_t free_space)
/*
* Add item data to shared memory cache.
- * On successfull registration, returns cache id.
+ * On successful registration, returns cache id.
* The cache id is overwritten by the subsequent call to this function.
* On error returns NULL.
*/
@@ -1993,7 +1993,7 @@ static POOL_CACHEID *pool_add_item_shmem_cache(POOL_QUERY_HASH *query_hash, char
}
/*
- * Initialize the block if neccessary. If no live items are
+ * Initialize the block if necessary. If no live items are
* remained, we also initialize the block. If there's contiguous
* deleted items, we turn them into free space as well.
*/
@@ -2007,7 +2007,7 @@ static POOL_CACHEID *pool_add_item_shmem_cache(POOL_QUERY_HASH *query_hash, char
* Create contiguous free space. We assume that item bodies are
* ordered from bottom to top of the block, and corresponding item
* pointers are ordered from the youngest to the oldest in the
- * beggining of the block.
+ * beginning of the block.
*/
/*
@@ -2113,7 +2113,7 @@ static POOL_CACHEID *pool_add_item_shmem_cache(POOL_QUERY_HASH *query_hash, char
*/
if (bh->free_bytes < request_size)
{
- /* This shoud not happen */
+ /* This should not happen */
pool_error("pool_add_item_shmem_cache: not enough free space. Free space: %d required: %d block id:%d",
bh->free_bytes, request_size, blockid);
return NULL;
@@ -2278,8 +2278,8 @@ static POOL_CACHEID *pool_find_item_on_shmem_cache(POOL_QUERY_HASH *query_hash)
}
/*
- * Delete item data specifed cache id from shmem.
- * On sccessfull deletion, returns 0.
+ * Delete item data specified cache id from shmem.
+ * On successful deletion, returns 0.
* Other wise return -1.
* FSMM is also updated.
*/
@@ -2347,7 +2347,7 @@ static int pool_delete_item_shmem_cache(POOL_CACHEID *cacheid)
/*
* We do NOT count down bh->num_items here. The deleted space will be recycled
* by pool_add_item_shmem_cache(). However, if this is the last item, we can
- * recyle whole block.
+ * recycle whole block.
*
* 2012/4/1: Now we do not pack data in
* pool_add_item_shmem_cache() for performance reason. Also we
@@ -2466,7 +2466,7 @@ static void pool_wipe_out_cache_block(POOL_CACHE_BLOCKID blockid)
#endif
/*
- * Aquire lock: XXX giant lock
+ * Acquire lock: XXX giant lock
*/
void pool_shmem_lock(void)
{
@@ -2744,7 +2744,7 @@ static void pool_add_oids_temp_query_cache(POOL_TEMP_QUERY_CACHE *temp_cache, in
* 1) Create buffer using pool_create_buffer().
* 2) Add data to buffer using pool_add_buffer().
* 3) Extract (copied) data from buffer using pool_get_buffer().
- * 4) Optionaly you can:
+ * 4) Optionally you can:
* Obtain buffer length by using pool_get_buffer_length().
* Obtain buffer pointer by using pool_get_buffer_pointer().
* 5) Discard buffer using pool_discard_buffer().
@@ -2903,7 +2903,7 @@ static char *pool_get_current_cache_buffer(size_t *len)
/*
* Mark this temporary query cache buffer discarded if the SELECT
- * uses the table oid specied by oids.
+ * uses the table oid specified by oids.
*/
static void pool_check_and_discard_cache_buffer(int num_oids, int *oids)
{
@@ -3223,7 +3223,7 @@ POOL_QUERY_CACHE_STATS *pool_get_memqcache_stats(void)
/*
* Reset query cache stats. Caller must lock QUERY_CACHE_STATS_SEM if
- * neccessary.
+ * necessary.
*/
void pool_reset_memqcache_stats(void)
{
@@ -3232,8 +3232,8 @@ void pool_reset_memqcache_stats(void)
}
/*
- * Count up number of successfull SELECTs and returns the number.
- * QUERY_CACHE_STATS_SEM lock is aquired in this function.
+ * Count up number of successful SELECTs and returns the number.
+ * QUERY_CACHE_STATS_SEM lock is acquired in this function.
*/
long long int pool_stats_count_up_num_selects(long long int num)
{
@@ -3252,7 +3252,7 @@ long long int pool_stats_count_up_num_selects(long long int num)
}
/*
- * Count up number of successfull SELECTs in temporary area and returns
+ * Count up number of successful SELECTs in temporary area and returns
* the number.
*/
long long int pool_tmp_stats_count_up_num_selects(void)
@@ -3265,7 +3265,7 @@ long long int pool_tmp_stats_count_up_num_selects(void)
}
/*
- * Return number of successfull SELECTs in temporary area.
+ * Return number of successful SELECTs in temporary area.
*/
long long int pool_tmp_stats_get_num_selects(void)
{
@@ -3276,7 +3276,7 @@ long long int pool_tmp_stats_get_num_selects(void)
}
/*
- * Reset number of successfull SELECTs in temporary area.
+ * Reset number of successful SELECTs in temporary area.
*/
void pool_tmp_stats_reset_num_selects(void)
{
@@ -3288,7 +3288,7 @@ void pool_tmp_stats_reset_num_selects(void)
/*
* Count up number of SELECTs extracted from cache returns the number.
- * QUERY_CACHE_STATS_SEM lock is aquired in this function.
+ * QUERY_CACHE_STATS_SEM lock is acquired in this function.
*/
long long int pool_stats_count_up_num_cache_hits(void)
{
@@ -3686,7 +3686,7 @@ static void put_back_hash_element(volatile POOL_HASH_ELEMENT *element)
* Subsequent call to this function will break return value
* because its in static memory.
* Caller must hold shmem_lock before calling this function.
- * If on mememory query cache is not enabled, all stats are 0.
+ * If on memory query cache is not enabled, all stats are 0.
*/
POOL_SHMEM_STATS *pool_get_shmem_storage_stats(void)
{
diff --git a/pool_memqcache.h b/pool_memqcache.h
index a070ece64..63e1e71ab 100644
--- a/pool_memqcache.h
+++ b/pool_memqcache.h
@@ -35,7 +35,7 @@
#define POOL_MD5_HASHKEYLEN 32 /* MD5 hash key length */
/*
- * On memory query cache on shmem is devided into fixed length "cache
+ * On memory query cache on shmem is divided into fixed length "cache
* block". Each block is assigned a "cache block id", which is
* starting with 0.
*/
@@ -80,8 +80,8 @@ typedef struct {
} POOL_CACHE_ITEM_POINTER;
/*
- * Each block holds several "cach item", which consists of variable
- * lenghth of Data(header plus RowDescription packet and DataRow
+ * Each block holds several "cache item", which consists of variable
+ * length of Data(header plus RowDescription packet and DataRow
* packet). Each cache item is assigned "cache item id", which
* represents the cache item order in a block.
*/
@@ -168,7 +168,7 @@ typedef struct
typedef struct
{
time_t start_time; /* start time when the statistics begins */
- long long int num_selects; /* number of successfull SELECTs */
+ long long int num_selects; /* number of successful SELECTs */
long long int num_cache_hits; /* number of SELECTs extracted from cache */
} POOL_QUERY_CACHE_STATS;
@@ -182,12 +182,12 @@ typedef struct
int num_cache_entries; /* number of used cache entries */
long used_cache_entries_size; /* total size of used cache entries */
long free_cache_entries_size; /* total size of free(usable) cache entries */
- long fragment_cache_entries_size; /* total size of fragment(unsable) cache entries */
+ long fragment_cache_entries_size; /* total size of fragment(unusable) cache entries */
POOL_QUERY_CACHE_STATS cache_stats;
} POOL_SHMEM_STATS;
/*--------------------------------------------------------------------------------
- * On shared memory hsah table implementation
+ * On shared memory hash table implementation
*--------------------------------------------------------------------------------
*/
diff --git a/pool_params.c b/pool_params.c
index b00a79c7e..871c6332e 100644
--- a/pool_params.c
+++ b/pool_params.c
@@ -18,7 +18,7 @@
* suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
- * params.c: Paramter Status handling routines
+ * params.c: Parameter Status handling routines
*
*/
#include "config.h"
diff --git a/pool_passwd.c b/pool_passwd.c
index 588eff229..a66d0fce3 100644
--- a/pool_passwd.c
+++ b/pool_passwd.c
@@ -67,7 +67,7 @@ void pool_init_pool_passwd(char *pool_passwd_filename)
/*
* Update passwd. If the user does not exist, create a new entry.
- * Returns 0 on success non 0 oterwise.
+ * Returns 0 on success non 0 otherwise.
*/
int pool_create_passwdent(char *username, char *passwd)
{
@@ -231,7 +231,7 @@ void pool_delete_passwdent(char *username)
}
/*
- * Finish this moule. Close pool_passwd.
+ * Finish this moil. Close pool_passwd.
*/
void pool_finish_pool_passwd(void)
{
diff --git a/pool_proto_modules.c b/pool_proto_modules.c
index 500ed4928..b984a94ff 100644
--- a/pool_proto_modules.c
+++ b/pool_proto_modules.c
@@ -82,7 +82,7 @@ char query_string_buffer[QUERY_STRING_BUFFER_LEN];
/*
* query string produced by nodeToString() in simpleQuery().
- * this variable only usefull when enable_query_cache is true.
+ * this variable only useful when enable_query_cache is true.
*/
char *parsed_query = NULL;
@@ -453,7 +453,7 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend,
if (!RAW_MODE)
{
/*
- * If there's only one node to send the commad, there's no
+ * If there's only one node to send the command, there's no
* point to start a transaction.
*/
if (pool_multi_node_to_be_sent(query_context))
@@ -747,7 +747,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend,
query_context->query_w_hex = search_query;
/*
- * When a transaction is comitted, query_context->temp_cache->query is used
+ * When a transaction is committed, query_context->temp_cache->query is used
* to create md5 hash to search for query cache.
* So overwrite the query text in temp cache to the one with the hex of bind message.
* If not, md5 hash will be created by the query text without bind message, and
@@ -1155,7 +1155,7 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend,
{
/*
* Check if other than deadlock error detected. If so, emit
- * log. This is usefull when invalid encoding error occurs. In
+ * log. This is useful when invalid encoding error occurs. In
* this case, PostgreSQL does not report what statement caused
* that error and make users confused.
*/
@@ -1260,7 +1260,7 @@ POOL_STATUS Bind(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend,
}
/*
- * If the query can ce cached, save its offset of query text in bind message's content.
+ * If the query can be cached, save its offset of query text in bind message's content.
*/
if (query_context->is_cache_safe)
{
@@ -1700,7 +1700,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend,
* If the query was COMMIT/ABORT, clear the history
* that we had a writing command in the transaction
* and forget the transaction isolation level. This
- * is neccessary if succeeding transaction is not an
+ * is necessary if succeeding transaction is not an
* explicit one.
*/
else if (is_commit_or_rollback_query(node))
@@ -1748,7 +1748,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend,
* If the query was CREATE TEMP TABLE, discard
* temp table relcache because we might have had
* persistent table relation cache which has table
- * name as the tem table.
+ * name as the temp table.
*/
if (IsA(node, CreateStmt))
{
@@ -1765,7 +1765,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend,
/* If we are doing extended query and the state is after EXECUTE,
* then we can commit cache.
* We check latter condition by looking at query_context->query_w_hex.
- * This check is neccessary for certain frame work such as PHP PDO.
+ * This check is necessary for certain frame work such as PHP PDO.
* It sends Sync message right after PARSE and it produces
* "Ready for query" message from backend.
*/
@@ -2053,7 +2053,7 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac
rows = extract_ntuples(p);
/*
- * Save number of affcted tuples of master node.
+ * Save number of affected tuples of master node.
*/
session_context->ntuples[MASTER_NODE_ID] = rows;
@@ -2093,7 +2093,7 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac
int n = extract_ntuples(p);
/*
- * Save number of affcted tuples.
+ * Save number of affected tuples.
*/
session_context->ntuples[i] = n;
@@ -2111,7 +2111,7 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac
{
/*
* Remember that we have different number of UPDATE/DELETE
- * affcted tuples in backends.
+ * affected tuples in backends.
*/
session_context->mismatch_ntuples = true;
}
@@ -2431,7 +2431,7 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend,
pool_unset_doing_extended_query_message();
/*
- * Alloate buffer and copy the packet contents. Because inside
+ * Allocate buffer and copy the packet contents. Because inside
* these protocol modules, pool_read2 maybe called and modify its
* buffer contents.
*/
diff --git a/pool_proto_modules.h b/pool_proto_modules.h
index 533a86bea..8c931e22c 100644
--- a/pool_proto_modules.h
+++ b/pool_proto_modules.h
@@ -20,7 +20,7 @@
* is" without express or implied warranty.
*
* pool_proto_modules.h.: header file for pool_proto_modules.c, pool_proto2.c
- * and pool_process_qeury.c
+ * and pool_process_query.c
*
*/
diff --git a/pool_query_cache.c b/pool_query_cache.c
index 677bdaf36..435ace53c 100644
--- a/pool_query_cache.c
+++ b/pool_query_cache.c
@@ -257,8 +257,8 @@ pool_query_cache_table_exists(void)
* query must be forwarded to the backends in order to retrieve data and
* the result be cached.
* Only difference is that POOL_ERROR indicates that some fatal error has
- * occured; query cache function, however, should be seemless to the user
- * whether cache was not found or error has occured during cache retrieve.
+ * occurred; query cache function, however, should be seamless to the user
+ * whether cache was not found or error has occurred during cache retrieve.
* --------------------------------
*/
POOL_STATUS
@@ -459,7 +459,7 @@ search_system_db_for_cache(POOL_CONNECTION *frontend, char *sql, int sql_len, st
status = ForwardCacheToFrontend(frontend, cache, tstate);
if (status < 0)
{
- /* fatal error has occured while forwarding cache */
+ /* fatal error has occurred while forwarding cache */
pool_error("pool_query_cache_lookup: query cache forwarding failed");
return_value = CACHE_ERROR;
}
@@ -582,7 +582,7 @@ static int ForwardCacheToFrontend(POOL_CONNECTION *frontend, char *cache, char t
/* --------------------------------
* pool_query_cache_register() - register query cache to the SystemDB
*
- * returns 0 on sucess, -1 otherwise
+ * returns 0 on success, -1 otherwise
* --------------------------------
*/
int
diff --git a/pool_query_context.c b/pool_query_context.c
index 4fabde219..bcdad5a88 100644
--- a/pool_query_context.c
+++ b/pool_query_context.c
@@ -279,7 +279,7 @@ int pool_virtual_master_db_node_id(void)
/*
* No query context exists. If in master/slave mode, returns
- * primary node if exists. Oterwise returns my_master_node_id,
+ * primary node if exists. Otherwise returns my_master_node_id,
* which represents the last REAL_MASTER_NODE_ID.
*/
if (MASTER_SLAVE)
@@ -340,14 +340,14 @@ void pool_where_to_send(POOL_QUERY_CONTEXT *query_context, char *query, Node *no
else if (MASTER_SLAVE && query_context->is_multi_statement)
{
/*
- * If we are in master/slave mode and we have multi stametemt
+ * If we are in master/slave mode and we have multi statement
* query, we should send it to primary server only. Otherwise
* it is possible to send a write query to standby servers
* because we only use the first element of the multi
* statement query and don't care about the rest. Typical
* situation where we are bugged by this is, "BEGIN;DELETE
* FROM table;END". Note that from pgpool-II 3.1.0
- * transactional statements such as "BEGIN" is unconditionaly
+ * transactional statements such as "BEGIN" is unconditionally
* sent to all nodes(see send_to_where() for more details).
* Someday we might be able to understand all part of multi
* statement queries, but until that day we need this band
@@ -701,7 +701,7 @@ POOL_STATUS pool_send_and_wait(POOL_QUERY_CONTEXT *query_context,
/*
* Check if some error detected. If so, emit
- * log. This is usefull when invalid encoding error
+ * log. This is useful when invalid encoding error
* occurs. In this case, PostgreSQL does not report
* what statement caused that error and make users
* confused.
@@ -901,7 +901,7 @@ POOL_STATUS pool_extended_send_and_wait(POOL_QUERY_CONTEXT *query_context,
/*
* Check if some error detected. If so, emit
- * log. This is usefull when invalid encoding error
+ * log. This is useful when invalid encoding error
* occurs. In this case, PostgreSQL does not report
* what statement caused that error and make users
* confused.
@@ -953,7 +953,7 @@ static POOL_DEST send_to_where(Node *node, char *query)
T_ClosePortalStmt,
T_ClusterStmt,
T_CopyStmt,
- T_CreateStmt, /* CREAE TABLE */
+ T_CreateStmt, /* CREATE TABLE */
T_DefineStmt, /* CREATE AGGREGATE, OPERATOR, TYPE */
T_DropStmt, /* DROP TABLE etc. */
T_TruncateStmt,
@@ -1258,7 +1258,7 @@ void where_to_send_deallocate(POOL_QUERY_CONTEXT *query_context, Node *node)
/*
* Returns parse tree for current query.
- * Preconition: the query is in progress state.
+ * Precondition: the query is in progress state.
*/
Node *pool_get_parse_tree(void)
{
@@ -1485,7 +1485,7 @@ void pool_set_query_state(POOL_QUERY_CONTEXT *query_context, POOL_QUERY_STATE st
/*
* Return -1, 0 or 1 according to s1 is "before, equal or after" s2 in terms of state
* transition order.
- * The State transiton order is defined as: UNPARSED < PARSE_COMPLETE < BIND_COMPLETE < EXECUTE_COMPLETE
+ * The State transition order is defined as: UNPARSED < PARSE_COMPLETE < BIND_COMPLETE < EXECUTE_COMPLETE
*/
int statecmp(POOL_QUERY_STATE s1, POOL_QUERY_STATE s2)
{
diff --git a/pool_relcache.c b/pool_relcache.c
index 821ade1ae..bd8db8a3c 100644
--- a/pool_relcache.c
+++ b/pool_relcache.c
@@ -232,7 +232,7 @@ void *pool_search_relcache(POOL_RELCACHE *relcache, POOL_CONNECTION_POOL *backen
relcache->cache[index].expire = 0;
}
/*
- * Call user defined unregister/register fuction.
+ * Call user defined unregister/register function.
*/
(*relcache->unregister_func)(relcache->cache[index].data);
relcache->cache[index].data = result;
diff --git a/pool_rewrite_query.c b/pool_rewrite_query.c
index 8f8070b1c..d09139f19 100644
--- a/pool_rewrite_query.c
+++ b/pool_rewrite_query.c
@@ -189,7 +189,7 @@ static void examInsertStmt(Node *node,POOL_CONNECTION_POOL *backend, RewriteQuer
/* send error message to frontend */
message->r_code = INSERT_SQL_RESTRICTION;
message->r_node = -1;
- message->rewrite_query = pool_error_message("cannot analzye this InsertStmt");
+ message->rewrite_query = pool_error_message("cannot analyze this InsertStmt");
return;
}
@@ -403,7 +403,7 @@ RewriteQuery *rewrite_query_stmt(Node *node,POOL_CONNECTION *frontend,POOL_CONNE
else
{
/*
- * Ohter cases of message->r_code == SELECT_RELATION_ERROR
+ * Other cases of message->r_code == SELECT_RELATION_ERROR
* or SELECT_PG_CATALOG,
* Transmit the Query to Master node and receive status.
*/
@@ -531,7 +531,7 @@ void analyze_debug(RewriteQuery *message)
* This function checks the KEYWORD(POOL_PARALLEL,POOL_LOADBALANCE)
* if the special function(like pool_parallel() or pool_loadbalance())
* is used, mark the r_code,is_parallel and is_loadbalance.
- * In othe cases, It is necessary to analyze the Query.
+ * In other cases, It is necessary to analyze the Query.
*/
RewriteQuery *is_parallel_query(Node *node, POOL_CONNECTION_POOL *backend)
{
diff --git a/pool_rewrite_query.h b/pool_rewrite_query.h
index 97c85c41d..557551c2d 100644
--- a/pool_rewrite_query.h
+++ b/pool_rewrite_query.h
@@ -69,11 +69,11 @@ typedef struct {
RepliDefInfo *repliinfo; /* replication table info */
SelectDefInfo *selectinfo; /* Sub-Select info */
char *alias; /* alias name */
- char state; /* P = parallel, L = loadbarance S = systemdb(dblink) E = error*/
+ char state; /* P = parallel, L = loadbalance S = systemdb(dblink) E = error*/
int ret_num; /* build column number */
} RangeInfo;
-/* build Virtual Table of FROM-Cluase */
+/* build Virtual Table of FROM-Clause */
typedef struct {
char **col_list; /* column list */
char **type_list; /* type list */
@@ -89,9 +89,9 @@ typedef struct {
char **col_list; /* column list */
char **type_list; /* type list */
char **table_list; /* table list */
- char state; /* P = parallel, L = loadbarance S = systemdb(dblink) E = error*/
+ char state; /* P = parallel, L = loadbalance S = systemdb(dblink) E = error*/
int *valid; /* valid column is true */
- int col_num; /* number of colum */
+ int col_num; /* number of column */
char **using_list; /* if join expr has using-list, column name is listed up */
int using_length; /* column number of using-list */
} JoinTable;
@@ -113,13 +113,13 @@ typedef struct {
bool opt; /* optimization flag */
} Aggexpr;
-/* main struct of alanyzing query */
+/* main struct of analyzing query */
typedef struct {
int now_select; /* rank of select */
- int part; /* the postion of analyzing select statement */
+ int part; /* the position of analyzing select statement */
int last_select; /* caller select rank */
int call_part; /* caller's potion */
- int from_num; /* number for from-cluase */
+ int from_num; /* number for from-clause */
int larg_count; /* left arg count */
int rarg_count; /* right arg count */
int ret_count; /* return list count */
@@ -128,13 +128,13 @@ typedef struct {
char partstate[8]; /* state of analyzing part */
bool select_union; /* if UNION is used, this flag is true */
bool select_range; /* RangeSubSelect is used */
- bool aggregate; /* aggregate optimaztion ? */
+ bool aggregate; /* aggregate optimization ? */
bool retlock; /* this is used */
Aggexpr *aggexpr; /* Aggexpr in this statement*/
- RangeInfo **range; /* RangeInfo in from cluase */
+ RangeInfo **range; /* RangeInfo in from clause */
int rangeinfo_num; /* RangeInfo's number in this select statement*/
- VirtualTable *virtual; /* Virtual Table in this select statment */
- JoinTable *join; /* sumary of join table */
+ VirtualTable *virtual; /* Virtual Table in this select statement */
+ JoinTable *join; /* summary of join table */
SelectDefInfo *select_ret; /* build return list */
} AnalyzeSelect;
@@ -145,18 +145,18 @@ typedef struct {
typedef struct {
int r_code; /* analyze or rewrite */
int r_node; /* which node, query is sent */
- int part; /* part of select statment */
- int rewritelock; /* dblink start postion and lock rewrite */
+ int part; /* part of select statement */
+ int rewritelock; /* dblink start position and lock rewrite */
int analyze_num; /* sum of AnalyzeSelect */
- int current_select; /* postion of analyze[] */
+ int current_select; /* position of analyze[] */
int ignore_rewrite; /* dont rewrite */
int column; /* column number */
int virtual_num; /* Virtual table column number */
- int ret_num; /* expect return cloumn number */
+ int ret_num; /* expect return column number */
bool is_pg_catalog; /* reference of pg_catalog */
- bool is_loadbalance; /* load ballance ? */
- bool is_parallel; /* can paralle exec ? */
- bool fromClause; /* having FromCluase ? */
+ bool is_loadbalance; /* load balance ? */
+ bool is_parallel; /* can parallel exec ? */
+ bool fromClause; /* having FromClause ? */
char *table_relname; /* table name */
char *table_alias; /* table alias name */
char *schemaname; /* schema */
@@ -174,7 +174,7 @@ typedef struct {
char *dbname; /* data base name */
char *user; /* access user name */
int port; /* access port number */
- char *password; /* passward of connection */
+ char *password; /* password of connection */
} ConInfoTodblink;
extern RewriteQuery *rewrite_query_stmt(Node *node, POOL_CONNECTION *frontend,POOL_CONNECTION_POOL *backend,RewriteQuery *message);
diff --git a/pool_select_walker.c b/pool_select_walker.c
index 58eab6c49..ea467f556 100644
--- a/pool_select_walker.c
+++ b/pool_select_walker.c
@@ -137,7 +137,7 @@ bool pool_has_view(Node *node)
}
/*
- * Return true if this SELECT has INSERT INTO or FOR SHARE or FOR UDPATE.
+ * Return true if this SELECT has INSERT INTO or FOR SHARE or FOR UPDATE.
*/
bool pool_has_insertinto_or_locking_clause(Node *node)
{
@@ -1068,7 +1068,7 @@ makeRangeVarFromNameList(List *names)
/*
* Extract table name from RageVar. Make schema qualification name if
- * neccessary. The returned table name is in static area. So next
+ * necessary. The returned table name is in static area. So next
* call to this function will break previous result.
*/
static char *make_table_name_from_rangevar(RangeVar *rangevar)
diff --git a/pool_session_context.c b/pool_session_context.c
index 49955e707..1947d19d6 100644
--- a/pool_session_context.c
+++ b/pool_session_context.c
@@ -64,7 +64,7 @@ void pool_init_session_context(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *
/* Create memory context */
session_context->memory_context = pool_memory_create(PREPARE_BLOCK_SIZE);
- /* Choose load balancing node if neccessary */
+ /* Choose load balancing node if necessary */
if (pool_config->load_balance_mode)
{
ProcessInfo *process_info = pool_get_my_process_info();
@@ -102,7 +102,7 @@ void pool_init_session_context(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *
/* Backends have not ignored messages yet */
pool_unset_ignore_till_sync();
- /* Initialize where to send map for PREPARE statemets */
+ /* Initialize where to send map for PREPARE statements */
#ifdef NOT_USED
memset(&session_context->prep_where, 0, sizeof(session_context->prep_where));
session_context->prep_where.nelem = POOL_MAX_PREPARED_STATEMENTS;
diff --git a/pool_session_context.h b/pool_session_context.h
index f351e751b..74402b7a0 100644
--- a/pool_session_context.h
+++ b/pool_session_context.h
@@ -60,7 +60,7 @@ typedef struct {
*/
bool is_cache_safe; /* true if the query can be cached */
int param_offset; /* Offset from contents where actual bind
- * paramters are stored.
+ * parameters are stored.
* This is meaningful only when is_cache_safe is true.
*/
} POOL_SENT_MESSAGE;
@@ -123,7 +123,7 @@ typedef struct {
#endif /* NOT_USED */
POOL_MEMORY_POOL *memory_context; /* memory context for session */
- /* message which does'nt receive complete message */
+ /* message which doesn't receive complete message */
POOL_SENT_MESSAGE *uncompleted_message;
POOL_SENT_MESSAGE_LIST message_list;
@@ -152,7 +152,7 @@ typedef struct {
* Query cache management area
*/
POOL_QUERY_CACHE_ARRAY *query_cache_array; /* pending SELECT results */
- long long int num_selects; /* number of successfull SELECTs in this transaction */
+ long long int num_selects; /* number of successful SELECTs in this transaction */
} POOL_SESSION_CONTEXT;
extern void pool_init_session_context(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend);
diff --git a/pool_stream.c b/pool_stream.c
index 0b1bc02ab..b62bd61e3 100644
--- a/pool_stream.c
+++ b/pool_stream.c
@@ -168,7 +168,7 @@ int pool_read(POOL_CONNECTION *cp, void *buf, int len)
if (cp->isbackend)
{
- /* if fail_over_on_backend_erro is true, then trigger failover */
+ /* if fail_over_on_backend_error is true, then trigger failover */
if (pool_config->fail_over_on_backend_error)
{
notice_backend_error(cp->db_node_id);
@@ -291,7 +291,7 @@ char *pool_read2(POOL_CONNECTION *cp, int len)
if (cp->isbackend)
{
- /* if fail_over_on_backend_erro is true, then trigger failover */
+ /* if fail_over_on_backend_error is true, then trigger failover */
if (pool_config->fail_over_on_backend_error)
{
notice_backend_error(cp->db_node_id);
@@ -430,7 +430,7 @@ int pool_flush_it(POOL_CONNECTION *cp)
}
else if (FD_ISSET(cp->fd, &exceptmask))
{
- pool_log("pool_flush_it: exception occured");
+ pool_log("pool_flush_it: exception occurred");
cp->wbufpo = 0;
return -1;
}
@@ -503,7 +503,7 @@ int pool_flush(POOL_CONNECTION *cp)
{
if (cp->isbackend)
{
- /* if fail_over_on_backend_erro is true, then trigger failover */
+ /* if fail_over_on_backend_error is true, then trigger failover */
if (pool_config->fail_over_on_backend_error)
{
notice_backend_error(cp->db_node_id);
diff --git a/pool_timestamp.c b/pool_timestamp.c
index e83342112..c573da34a 100644
--- a/pool_timestamp.c
+++ b/pool_timestamp.c
@@ -317,7 +317,7 @@ get_current_timestamp(POOL_CONNECTION_POOL *backend)
status = do_query(MASTER(backend), "SELECT now()", &res, MAJOR(backend));
if (status != POOL_CONTINUE)
{
- pool_error("get_current_timestamp: do_query faild");
+ pool_error("get_current_timestamp: do_query failed");
return NULL;
}
@@ -868,7 +868,7 @@ static A_Const *makeStringConstFromQuery(POOL_CONNECTION_POOL *backend, char *ex
status = do_query(MASTER(backend), query, &res, MAJOR(backend));
if (status != POOL_CONTINUE)
{
- pool_error("makeStringConstFromQuery: do_query faild");
+ pool_error("makeStringConstFromQuery: do_query failed");
return NULL;
}
diff --git a/pool_worker_child.c b/pool_worker_child.c
index c8db8ba76..bf25dad46 100644
--- a/pool_worker_child.c
+++ b/pool_worker_child.c
@@ -191,7 +191,7 @@ static void discard_persistent_connection(void)
}
/*
- * Check replicaton time lag
+ * Check replication time lag
*/
static void check_replication_time_lag(void)
{
diff --git a/watchdog/watchdog.h b/watchdog/watchdog.h
index 332a96020..8f4404b9f 100644
--- a/watchdog/watchdog.h
+++ b/watchdog/watchdog.h
@@ -75,9 +75,9 @@ typedef enum {
WD_DECLARE_LOCK_HOLDER, /* announce to assume lock holder */
WD_RESIGN_LOCK_HOLDER, /* announce to resign lock holder */
WD_START_INTERLOCK, /* announce to start interlocking */
- WD_END_INTERLOCK, /* annnouce to end interlocking */
+ WD_END_INTERLOCK, /* announce to end interlocking */
WD_SERVER_DOWN, /* announce server down */
- WD_AUTH_FAILED, /* fail anwser to authentication */
+ WD_AUTH_FAILED, /* fail answer to authentication */
WD_READY, /* answer to the announce */
/* node packet */
@@ -90,7 +90,7 @@ typedef enum {
WD_NODE_FAILED, /* fail answer to the node announce */
/* lock packet */
- WD_UNLOCK_REQUEST, /* annouce to unlocak command */
+ WD_UNLOCK_REQUEST, /* announce to unlock command */
WD_LOCK_READY, /* answer to the lock announce */
WD_LOCK_FAILED /* fail answer to the lock announce */
diff --git a/watchdog/wd_child.c b/watchdog/wd_child.c
index 9c07dc80c..97d6ee2ea 100644
--- a/watchdog/wd_child.c
+++ b/watchdog/wd_child.c
@@ -149,7 +149,7 @@ wd_send_response(int sock, WdPacket * recv_pack)
memset(&send_packet, 0, sizeof(WdPacket));
p = &(recv_pack->wd_body.wd_info);
- /* auhtentication */
+ /* authentication */
if (strlen(pool_config->wd_authkey))
{
/* calculate hash from packet */
@@ -221,14 +221,14 @@ wd_send_response(int sock, WdPacket * recv_pack)
memcpy(&(send_packet.wd_body.wd_info), WD_MYSELF, sizeof(WdInfo));
break;
- /* annouce to assume lock holder */
+ /* announce to assume lock holder */
case WD_STAND_FOR_LOCK_HOLDER:
p = &(recv_pack->wd_body.wd_info);
wd_set_wd_list(p->hostname,p->pgpool_port, p->wd_port, p->delegate_ip, &(p->tv), p->status);
/* only master handles lock holder privilege */
if (WD_MYSELF->status == WD_MASTER)
{
- /* if theare are no lock holder yet */
+ /* if there are no lock holder yet */
if (wd_get_lock_holder() != NULL)
{
send_packet.packet_no = WD_LOCK_HOLDER_EXIST;
@@ -245,7 +245,7 @@ wd_send_response(int sock, WdPacket * recv_pack)
memcpy(&(send_packet.wd_body.wd_info), WD_MYSELF, sizeof(WdInfo));
break;
- /* annouce to resigne lock holder */
+ /* announce to resign lock holder */
case WD_RESIGN_LOCK_HOLDER:
p = &(recv_pack->wd_body.wd_info);
wd_set_wd_list(p->hostname,p->pgpool_port, p->wd_port, p->delegate_ip, &(p->tv), p->status);
@@ -334,8 +334,8 @@ wd_send_response(int sock, WdPacket * recv_pack)
rtn = wd_send_packet(sock, &send_packet);
/* send node request signal.
- * wd_node_request_singnal() uses a semaphore lock internally, so should be
- * called after sending a response pakcet to prevent dead lock.
+ * wd_node_request_signal() uses a semaphore lock internally, so should be
+ * called after sending a response packet to prevent dead lock.
*/
if (is_node_packet)
wd_node_request_signal(recv_pack->packet_no, node);
diff --git a/watchdog/wd_heartbeat.c b/watchdog/wd_heartbeat.c
index 32c9a0bae..4b6c6cc0f 100644
--- a/watchdog/wd_heartbeat.c
+++ b/watchdog/wd_heartbeat.c
@@ -342,7 +342,7 @@ pid_t wd_hb_receiver(int fork_wait_time, WdHbIf hb_if)
{
if (wd_hb_recv(sock, &pkt) == WD_OK)
{
- /* auhtentication */
+ /* authentication */
if (strlen(pool_config->wd_authkey))
{
/* calculate hash from packet */
@@ -522,7 +522,7 @@ ntoh_wd_hb_packet(WdHbPacket * to, WdHbPacket * from)
return WD_OK;
}
-/* convert pakcet to string and return length of the string */
+/* convert packet to string and return length of the string */
static int packet_to_string_hb(WdHbPacket pkt, char *str, int maxlen)
{
int len;
diff --git a/watchdog/wd_interlock.c b/watchdog/wd_interlock.c
index e00fcc0e9..7daf5527f 100644
--- a/watchdog/wd_interlock.c
+++ b/watchdog/wd_interlock.c
@@ -82,7 +82,7 @@ void wd_start_interlock(void)
wd_lock_all();
}
-/* notify to end intelocking */
+/* notify to end interlocking */
void wd_end_interlock(void)
{
pool_log("wd_end_interlock: end interlocking");
@@ -160,7 +160,7 @@ wd_assume_lock_holder(void)
}
/*
- * update information of who's loock holder
+ * update information of who's lock holder
* Note that the lock holder pgpool can go down accidentally.
*/
static void
diff --git a/watchdog/wd_list.c b/watchdog/wd_list.c
index ae385bc53..56e73c3b2 100644
--- a/watchdog/wd_list.c
+++ b/watchdog/wd_list.c
@@ -132,7 +132,7 @@ wd_add_wd_list(WdDesc * other_wd)
return i;
}
-/* set watchdog informaion to list */
+/* set watchdog information to list */
int
wd_set_wd_info(WdInfo * info)
{
@@ -163,7 +163,7 @@ wd_is_exist_master(void)
return NULL;
}
-/* set or unset in_interloking flag */
+/* set or unset in_interlocking flag */
void
wd_set_interlocking(WdInfo *info, bool value)
{
diff --git a/watchdog/wd_packet.c b/watchdog/wd_packet.c
index 09d1953b7..fe4374142 100644
--- a/watchdog/wd_packet.c
+++ b/watchdog/wd_packet.c
@@ -131,7 +131,7 @@ wd_notice_server_down(void)
return rtn;
}
-/* send authenticaiont failed packet */
+/* send authentication failed packet */
int
wd_authentication_failed(int sock)
{
@@ -344,7 +344,7 @@ wd_accept(int sock)
}
else if ( FD_ISSET(sock, &emask) )
{
- /* socket exception occured */
+ /* socket exception occurred */
break;
}
else if ( FD_ISSET(sock, &rmask) )
@@ -1071,7 +1071,7 @@ wd_set_node_mask (WD_PACKET_NO packet_no, int *node_id_set, int count)
return rtn;
}
-/* calculate hash for authentiction using packet contents */
+/* calculate hash for authentication using packet contents */
void
wd_calc_hash(const char *str, int len, char *buf)
{
diff --git a/watchdog/wd_ping.c b/watchdog/wd_ping.c
index 289a11818..22ec3f1df 100644
--- a/watchdog/wd_ping.c
+++ b/watchdog/wd_ping.c
@@ -42,7 +42,7 @@ static void * exec_ping(void * arg);
static double get_result (char * ping_data);
/**
- * Try to conect to trusted servers.
+ * Try to connect to trusted servers.
*/
int
wd_is_upper_ok(char * server_list)
@@ -125,7 +125,7 @@ wd_is_upper_ok(char * server_list)
}
/**
- * check if IP addres is unused.
+ * check if IP address is unused.
*/
int
wd_is_unused_ip(char * ip)
@@ -238,7 +238,7 @@ exec_ping(void * arg)
if (WIFEXITED(status) == 0)
{
- pool_error("exec_ping: %s exited abnormaly", ping_path);
+ pool_error("exec_ping: %s exited abnormally", ping_path);
close(pfd[0]);
return WD_NG;
}
@@ -290,7 +290,7 @@ get_result (char * ping_data)
/*
skip result until average data
- tipical result of ping is as follows,
+ typical result of ping is as follows,
"rtt min/avg/max/mdev = 0.045/0.045/0.046/0.006 ms"
we can find the average data beyond the 4th '/'.
*/
[parent: e2761579d166]