Wed Apr 23 13:35:46 PDT 2008
- Previous message: [Slony1-commit] slony1-engine/src/slon/port win32service.c win32service.h
- Next message: [Slony1-commit] slony1-engine/src/slon remote_listen.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv2424/slon
Modified Files:
cleanup_thread.c confoptions.c confoptions.h dbutils.c
remote_listen.c remote_worker.c
Log Message:
Ran pgindent against C code
Index: dbutils.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/dbutils.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** dbutils.c 27 Jun 2007 16:20:24 -0000 1.28
--- dbutils.c 23 Apr 2008 20:35:43 -0000 1.29
***************
*** 27,31 ****
! static int slon_appendquery_int(SlonDString * dsp, char *fmt, va_list ap);
static int db_get_version(PGconn *conn);
--- 27,31 ----
! static int slon_appendquery_int(SlonDString *dsp, char *fmt, va_list ap);
static int db_get_version(PGconn *conn);
***************
*** 45,49 ****
/* ----------
! * slon_connectdb
* ----------
*/
--- 45,49 ----
/* ----------
! * slon_connectdb
* ----------
*/
***************
*** 107,111 ****
}
PQclear(res);
!
/*
* Embed it into a SlonConn structure used to exchange it with the
--- 107,111 ----
}
PQclear(res);
!
/*
* Embed it into a SlonConn structure used to exchange it with the
***************
*** 115,140 ****
conn->dbconn = dbconn;
conn->pg_version = db_get_version(dbconn);
! if (conn->pg_version < 80300)
! {
! slon_log(SLON_ERROR,
! "slon_connectdb: PQconnectdb(\"%s\") PostgreSQL version not supported\n",
! conninfo);
! PQfinish(dbconn);
! return NULL;
! }
!
! slon_log(SLON_CONFIG,
! "version for \"%s\" is %d\n", conninfo, conn->pg_version);
if (conn->pg_version >= 80100)
! {
! slon_mkquery(&query, "set escape_string_warning to 'off'");
! res = PQexec(dbconn, dstring_data(&query));
! if (!(PQresultStatus(res) == PGRES_COMMAND_OK))
! {
! slon_log(SLON_ERROR, "Unable to set escape_string_warning to off\n");
! }
! PQclear(res);
! }
if (conn->pg_version >= 80200)
{
--- 115,140 ----
conn->dbconn = dbconn;
conn->pg_version = db_get_version(dbconn);
! if (conn->pg_version < 80300)
! {
! slon_log(SLON_ERROR,
! "slon_connectdb: PQconnectdb(\"%s\") PostgreSQL version not supported\n",
! conninfo);
! PQfinish(dbconn);
! return NULL;
! }
!
! slon_log(SLON_CONFIG,
! "version for \"%s\" is %d\n", conninfo, conn->pg_version);
if (conn->pg_version >= 80100)
! {
! slon_mkquery(&query, "set escape_string_warning to 'off'");
! res = PQexec(dbconn, dstring_data(&query));
! if (!(PQresultStatus(res) == PGRES_COMMAND_OK))
! {
! slon_log(SLON_ERROR, "Unable to set escape_string_warning to off\n");
! }
! PQclear(res);
! }
if (conn->pg_version >= 80200)
{
***************
*** 144,148 ****
{
slon_log(SLON_ERROR, "Unable to set the standard_conforming_strings to off\n");
! }
PQclear(res);
}
--- 144,148 ----
{
slon_log(SLON_ERROR, "Unable to set the standard_conforming_strings to off\n");
! }
PQclear(res);
}
***************
*** 153,161 ****
/* ----------
! * slon_disconnectdb
* ----------
*/
void
! slon_disconnectdb(SlonConn * conn)
{
/*
--- 153,161 ----
/* ----------
! * slon_disconnectdb
* ----------
*/
void
! slon_disconnectdb(SlonConn *conn)
{
/*
***************
*** 175,179 ****
/* ----------
! * slon_make_dummyconn
* ----------
*/
--- 175,179 ----
/* ----------
! * slon_make_dummyconn
* ----------
*/
***************
*** 207,215 ****
/* ----------
! * slon_free_dummyconn
* ----------
*/
void
! slon_free_dummyconn(SlonConn * conn)
{
/*
--- 207,215 ----
/* ----------
! * slon_free_dummyconn
* ----------
*/
void
! slon_free_dummyconn(SlonConn *conn)
{
/*
***************
*** 234,238 ****
* db_getLocalNodeId
*
! * Query a connection for the value of sequence sl_local_node_id
* ----------
*/
--- 234,238 ----
* db_getLocalNodeId
*
! * Query a connection for the value of sequence sl_local_node_id
* ----------
*/
***************
*** 380,391 ****
*
* A simple query formatting and quoting function using dynamic string buffer
! * allocation. Similar to sprintf() it uses formatting symbols:
! * %s String argument
! * %q Quoted literal (\ and ' will be escaped)
! * %d Integer argument
* ----------
*/
int
! slon_mkquery(SlonDString * dsp, char *fmt,...)
{
va_list ap;
--- 380,391 ----
*
* A simple query formatting and quoting function using dynamic string buffer
! * allocation. Similar to sprintf() it uses formatting symbols:
! * %s String argument
! * %q Quoted literal (\ and ' will be escaped)
! * %d Integer argument
* ----------
*/
int
! slon_mkquery(SlonDString *dsp, char *fmt,...)
{
va_list ap;
***************
*** 410,414 ****
*/
int
! slon_appendquery(SlonDString * dsp, char *fmt,...)
{
va_list ap;
--- 410,414 ----
*/
int
! slon_appendquery(SlonDString *dsp, char *fmt,...)
{
va_list ap;
***************
*** 427,435 ****
* slon_appendquery_int
*
! * Implementation of slon_mkquery() and slon_appendquery().
* ----------
*/
static int
! slon_appendquery_int(SlonDString * dsp, char *fmt, va_list ap)
{
char *s;
--- 427,435 ----
* slon_appendquery_int
*
! * Implementation of slon_mkquery() and slon_appendquery().
* ----------
*/
static int
! slon_appendquery_int(SlonDString *dsp, char *fmt, va_list ap)
{
char *s;
***************
*** 503,515 ****
}
! static int db_get_version(PGconn *conn)
{
! PGresult *res;
SlonDString query;
! char versionstr[7];
! int version=0;
! int major=0;
! int minor=0;
! int patch=0;
dstring_init(&query);
--- 503,516 ----
}
! static int
! db_get_version(PGconn *conn)
{
! PGresult *res;
SlonDString query;
! char versionstr[7];
! int version = 0;
! int major = 0;
! int minor = 0;
! int patch = 0;
dstring_init(&query);
***************
*** 517,522 ****
res = PQexec(conn, dstring_data(&query));
! if ( !res || PQresultStatus(res) != PGRES_TUPLES_OK )
! {
PQclear(res);
return -1;
--- 518,523 ----
res = PQexec(conn, dstring_data(&query));
! if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
! {
PQclear(res);
return -1;
***************
*** 529,537 ****
PQclear(res);
snprintf(versionstr, 7, "%.2d%.2d%.2d", major, minor, patch);
! version=atoi(versionstr);
dstring_free(&query);
return version;
}
!
/*
* Local Variables:
--- 530,538 ----
PQclear(res);
snprintf(versionstr, 7, "%.2d%.2d%.2d", major, minor, patch);
! version = atoi(versionstr);
dstring_free(&query);
return version;
}
!
/*
* Local Variables:
Index: remote_listen.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_listen.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** remote_listen.c 6 Feb 2008 20:20:50 -0000 1.40
--- remote_listen.c 23 Apr 2008 20:35:43 -0000 1.41
***************
*** 1,3 ****
! /* ----------------------------------------------------------------------
* remote_listen.c
*
--- 1,3 ----
! * ----------------------------------------------------------------------
* remote_listen.c
*
***************
*** 698,702 ****
slon_appendquery(&query, ")");
}
! slon_appendquery(&query, " order by e.ev_origin, e.ev_seqno");
rtcfg_unlock();
--- 698,702 ----
slon_appendquery(&query, ")");
}
! slon_appendquery(&query, " order by e.ev_origin, e.ev_seqno limit 2000");
rtcfg_unlock();
Index: remote_worker.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -C2 -d -r1.166 -r1.167
*** remote_worker.c 14 Feb 2008 22:21:42 -0000 1.166
--- remote_worker.c 23 Apr 2008 20:35:43 -0000 1.167
***************
*** 25,34 ****
#include "slon.h"
#include "../parsestatements/scanner.h"
! extern int STMTS[MAXSTATEMENTS];
! #define MAXGROUPSIZE 10000 /* What is the largest number of SYNCs we'd want to group together??? */
/* ----------
! * Local definitions
* ----------
*/
[...3530 lines suppressed...]
! slon_appendquery(&query1, "select 1 from %s.sl_subscribe WHERE sub_set=%d AND sub_receiver=%d for update"
! ,rtcfg_namespace, set_id, node_id);
! res = PQexec(local_dbconn, dstring_data(&query1));
! if (PQresultStatus(res) != PGRES_TUPLES_OK)
! {
! slon_log(SLON_ERROR, "remoteWorkerThread_%d: DDL preparation can not check set membership"
! ,node_id);
! dstring_free(&query1);
! slon_retry();
! }
dstring_free(&query1);
! if (PQntuples(res) == 0)
! {
! PQclear(res);
! return 0;
! }
! PQclear(res);
! return 1;
Index: confoptions.h
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/confoptions.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** confoptions.h 3 Jan 2008 15:47:21 -0000 1.37
--- confoptions.h 23 Apr 2008 20:35:43 -0000 1.38
***************
*** 8,12 ****
void *get_config_option(const char *name);
! void dump_configuration(void);
extern char *rtcfg_cluster_name;
--- 8,12 ----
void *get_config_option(const char *name);
! void dump_configuration(void);
extern char *rtcfg_cluster_name;
***************
*** 21,25 ****
extern int sync_max_rowsize;
extern int sync_max_largemem;
! extern int remote_listen_timeout;
extern int sync_group_maxsize;
--- 21,25 ----
extern int sync_max_rowsize;
extern int sync_max_largemem;
! extern int remote_listen_timeout;
extern int sync_group_maxsize;
***************
*** 49,53 ****
char *sql_on_connection;
char *lag_interval;
! char *command_on_logarchive;
enum config_type
--- 49,53 ----
char *sql_on_connection;
char *lag_interval;
! char *command_on_logarchive;
enum config_type
***************
*** 63,68 ****
/* constant fields, must be set correctly in initial value: */
const char *name;
! const char *short_desc;
! const char *long_desc;
enum config_type vartype; /* type of variable (set only at startup) */
};
--- 63,68 ----
/* constant fields, must be set correctly in initial value: */
const char *name;
! const char *short_desc;
! const char *long_desc;
enum config_type vartype; /* type of variable (set only at startup) */
};
***************
*** 106,110 ****
/* (all are constants) */
char **variable;
! const char *default_val;
};
--- 106,110 ----
/* (all are constants) */
char **variable;
! const char *default_val;
};
***************
*** 115,119 ****
static struct config_real ConfigureNamesReal[];
static struct config_string ConfigureNamesString[];
-
#endif
/*
--- 115,118 ----
Index: cleanup_thread.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/cleanup_thread.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** cleanup_thread.c 25 Feb 2008 15:43:38 -0000 1.43
--- cleanup_thread.c 23 Apr 2008 20:35:43 -0000 1.44
***************
*** 27,36 ****
/* ----------
! * Global data
* ----------
*/
int vac_frequency = SLON_VACUUM_FREQUENCY;
! char *cleanup_interval;
! bool cleanup_deletelogs;
static int vac_bias = 0;
--- 27,36 ----
/* ----------
! * Global data
* ----------
*/
int vac_frequency = SLON_VACUUM_FREQUENCY;
! char *cleanup_interval;
! bool cleanup_deletelogs;
static int vac_bias = 0;
***************
*** 42,50 ****
*
* Periodically calls the stored procedure to remove old events and log data and
! * vacuums those tables.
* ----------
*/
void *
! cleanupThread_main(/*@unused@*/ void *dummy)
{
SlonConn *conn;
--- 42,50 ----
*
* Periodically calls the stored procedure to remove old events and log data and
! * vacuums those tables.
* ----------
*/
void *
! cleanupThread_main( /* @unused@ */ void *dummy)
{
SlonConn *conn;
***************
*** 62,66 ****
int vac_enable = SLON_VACUUM_FREQUENCY;
char *vacuum_action;
! int ntuples;
slon_log(SLON_CONFIG, "cleanupThread: thread starts\n");
--- 62,66 ----
int vac_enable = SLON_VACUUM_FREQUENCY;
char *vacuum_action;
! int ntuples;
slon_log(SLON_CONFIG, "cleanupThread: thread starts\n");
***************
*** 82,86 ****
{
#ifndef WIN32
! (void) kill(getpid(), SIGTERM);
pthread_exit(NULL);
#else
--- 82,86 ----
{
#ifndef WIN32
! (void) kill(getpid(), SIGTERM);
pthread_exit(NULL);
#else
***************
*** 89,102 ****
/* slon_retry(); */
}
!
dbconn = conn->dbconn;
/*
* Build the query string for calling the cleanupEvent() stored procedure
*/
dstring_init(&query_baseclean);
! slon_mkquery(&query_baseclean, "select %s.cleanupEvent('%s'::interval, '%s'::boolean); ",
! rtcfg_namespace,
! cleanup_interval,
! cleanup_deletelogs ? "true" : "false"
);
dstring_init(&query2);
--- 89,103 ----
/* slon_retry(); */
}
!
dbconn = conn->dbconn;
+
/*
* Build the query string for calling the cleanupEvent() stored procedure
*/
dstring_init(&query_baseclean);
! slon_mkquery(&query_baseclean, "select %s.cleanupEvent('%s'::interval, '%s'::boolean); ",
! rtcfg_namespace,
! cleanup_interval,
! cleanup_deletelogs ? "true" : "false"
);
dstring_init(&query2);
***************
*** 121,125 ****
slon_log(SLON_FATAL,
"cleanupThread: \"%s\" - %s",
! dstring_data(&query_baseclean), PQresultErrorMessage(res));
PQclear(res);
slon_retry();
--- 122,126 ----
slon_log(SLON_FATAL,
"cleanupThread: \"%s\" - %s",
! dstring_data(&query_baseclean), PQresultErrorMessage(res));
PQclear(res);
slon_retry();
***************
*** 135,139 ****
* Detain the usual suspects (vacuum event and log data)
*/
! if (vac_frequency !=0)
{
vac_enable = vac_frequency;
--- 136,140 ----
* Detain the usual suspects (vacuum event and log data)
*/
! if (vac_frequency != 0)
{
vac_enable = vac_frequency;
***************
*** 147,154 ****
if (earliest_xid == latest_xid)
{
!
slon_log(SLON_INFO,
"cleanupThread: xid %d still active - analyze instead\n",
! earliest_xid);
}
else
--- 148,155 ----
if (earliest_xid == latest_xid)
{
!
slon_log(SLON_INFO,
"cleanupThread: xid %d still active - analyze instead\n",
! earliest_xid);
}
else
***************
*** 170,208 ****
res = PQexec(dbconn, dstring_data(&query2));
! /* for each table... and we should set up the
! * query to return not only the table name,
! * but also a boolean to support what's in the
! * SELECT below; that'll nicely simplify this
! * process... */
!
! if (PQresultStatus(res) != PGRES_TUPLES_OK) /* query error */
{
slon_log(SLON_ERROR,
! "cleanupThread: \"%s\" - %s",
! dstring_data(&query2), PQresultErrorMessage(res));
}
ntuples = PQntuples(res);
slon_log(SLON_DEBUG1, "cleanupThread: number of tables to clean: %d\n", ntuples);
! for (t = 0; t < ntuples ; t++)
{
! char *tab_nspname = PQgetvalue(res, t, 0);
! char *tab_relname = PQgetvalue(res, t, 1);
! slon_log (SLON_DEBUG1, "cleanupThread: %s analyze \"%s\".%s;\n",
! vacuum_action, tab_nspname, tab_relname);
dstring_init(&query_pertbl);
! slon_mkquery (&query_pertbl, "%s analyze \"%s\".%s;",
! vacuum_action, tab_nspname, tab_relname);
res2 = PQexec(dbconn, dstring_data(&query_pertbl));
! if (PQresultStatus(res) != PGRES_COMMAND_OK) /* query error */
! {
! slon_log(SLON_ERROR,
! "cleanupThread: \"%s\" - %s",
! dstring_data(&query_pertbl), PQresultErrorMessage(res2));
! /*
! * slon_retry(); break;
! */
! }
PQclear(res2);
dstring_reset(&query_pertbl);
--- 171,210 ----
res = PQexec(dbconn, dstring_data(&query2));
! /*
! * for each table... and we should set up the query to return not
! * only the table name, but also a boolean to support what's in
! * the SELECT below; that'll nicely simplify this process...
! */
!
! if (PQresultStatus(res) != PGRES_TUPLES_OK) /* query error */
{
slon_log(SLON_ERROR,
! "cleanupThread: \"%s\" - %s",
! dstring_data(&query2), PQresultErrorMessage(res));
}
ntuples = PQntuples(res);
slon_log(SLON_DEBUG1, "cleanupThread: number of tables to clean: %d\n", ntuples);
! for (t = 0; t < ntuples; t++)
{
! char *tab_nspname = PQgetvalue(res, t, 0);
! char *tab_relname = PQgetvalue(res, t, 1);
! slon_log(SLON_DEBUG1, "cleanupThread: %s analyze \"%s\".%s;\n",
! vacuum_action, tab_nspname, tab_relname);
dstring_init(&query_pertbl);
! slon_mkquery(&query_pertbl, "%s analyze \"%s\".%s;",
! vacuum_action, tab_nspname, tab_relname);
res2 = PQexec(dbconn, dstring_data(&query_pertbl));
! if (PQresultStatus(res) != PGRES_COMMAND_OK) /* query error */
! {
! slon_log(SLON_ERROR,
! "cleanupThread: \"%s\" - %s",
! dstring_data(&query_pertbl), PQresultErrorMessage(res2));
!
! /*
! * slon_retry(); break;
! */
! }
PQclear(res2);
dstring_reset(&query_pertbl);
***************
*** 272,277 ****
PQclear(res);
dstring_free(&query);
! return (unsigned long)xid;
}
-
-
--- 274,277 ----
PQclear(res);
dstring_free(&query);
! return (unsigned long) xid;
}
Index: confoptions.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/confoptions.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** confoptions.c 14 Feb 2008 22:19:16 -0000 1.28
--- confoptions.c 23 Apr 2008 20:35:43 -0000 1.29
***************
*** 4,9 ****
#include "slon.h"
! #ifdef qsort
! #undef qsort
#endif
--- 4,9 ----
#include "slon.h"
! #ifdef qsort
! #undef qsort
#endif
***************
*** 18,47 ****
void *get_config_option(const char *name);
! static bool bool_placeholder;
! static double real_placeholder;
! static char *string_placeholder;
! void dump_configuration(void);
! void dump_configuration(void)
{
! int i;
! for (i = 0; ConfigureNamesInt[i].gen.name; i++) {
slon_log(SLON_CONFIG, "main: Integer option %s = %d\n",
! ConfigureNamesInt[i].gen.name, *(ConfigureNamesInt[i].variable));
}
! for (i = 0; ConfigureNamesBool[i].gen.name; i++) {
slon_log(SLON_CONFIG, "main: Boolean option %s = %d\n",
! ConfigureNamesBool[i].gen.name, *(ConfigureNamesBool[i].variable));
}
! for (i = 0; ConfigureNamesReal[i].gen.name; i++) {
slon_log(SLON_CONFIG, "main: Real option %s = %f\n",
! ConfigureNamesReal[i].gen.name, *(ConfigureNamesReal[i].variable));
}
! for (i = 0; ConfigureNamesString[i].gen.name; i++) {
slon_log(SLON_CONFIG, "main: String option %s = %s\n",
! ConfigureNamesString[i].gen.name, *(ConfigureNamesString[i].variable));
}
!
}
--- 18,53 ----
void *get_config_option(const char *name);
! static bool bool_placeholder;
! static double real_placeholder;
! static char *string_placeholder;
! void dump_configuration(void);
! void
! dump_configuration(void)
{
! int i;
!
! for (i = 0; ConfigureNamesInt[i].gen.name; i++)
! {
slon_log(SLON_CONFIG, "main: Integer option %s = %d\n",
! ConfigureNamesInt[i].gen.name, *(ConfigureNamesInt[i].variable));
}
! for (i = 0; ConfigureNamesBool[i].gen.name; i++)
! {
slon_log(SLON_CONFIG, "main: Boolean option %s = %d\n",
! ConfigureNamesBool[i].gen.name, *(ConfigureNamesBool[i].variable));
}
! for (i = 0; ConfigureNamesReal[i].gen.name; i++)
! {
slon_log(SLON_CONFIG, "main: Real option %s = %f\n",
! ConfigureNamesReal[i].gen.name, *(ConfigureNamesReal[i].variable));
}
! for (i = 0; ConfigureNamesString[i].gen.name; i++)
! {
slon_log(SLON_CONFIG, "main: String option %s = %s\n",
! ConfigureNamesString[i].gen.name, *(ConfigureNamesString[i].variable));
}
!
}
***************
*** 125,129 ****
num_conf_variables = num_vars;
size_conf_variables = size_vars;
! qsort((void *)conf_variables, (size_t) num_conf_variables, sizeof(struct config_generic *), conf_var_compare);
}
--- 131,135 ----
num_conf_variables = num_vars;
size_conf_variables = size_vars;
! qsort((void *) conf_variables, (size_t) num_conf_variables, sizeof(struct config_generic *), conf_var_compare);
}
***************
*** 131,135 ****
#ifdef NEED_ADD_CONF_VARIABLE
static bool
! add_conf_variable(struct config_generic * var, int elevel)
{
if (num_conf_variables + 1 >= size_conf_variables)
--- 137,141 ----
#ifdef NEED_ADD_CONF_VARIABLE
static bool
! add_conf_variable(struct config_generic *var, int elevel)
{
if (num_conf_variables + 1 >= size_conf_variables)
***************
*** 162,166 ****
}
conf_variables[num_conf_variables++] = var;
! qsort((void *)conf_variables, num_conf_variables,
sizeof(struct config_generic *), conf_var_compare);
return true;
--- 168,172 ----
}
conf_variables[num_conf_variables++] = var;
! qsort((void *) conf_variables, num_conf_variables,
sizeof(struct config_generic *), conf_var_compare);
return true;
***************
*** 227,233 ****
static bool
! parse_bool(const char *value, bool * result)
{
! int len = (int) strlen(value);
if (strncasecmp(value, "true", len) == 0)
--- 233,239 ----
static bool
! parse_bool(const char *value, bool *result)
{
! int len = (int) strlen(value);
if (strncasecmp(value, "true", len) == 0)
***************
*** 311,320 ****
#ifdef HAVE_LONG_INT_64
/* if long > 32 bits, check for overflow of int4 */
! || val != (long)((int32) val)
#endif
)
return false;
if (result)
! *result = (int)val;
return true;
}
--- 317,326 ----
#ifdef HAVE_LONG_INT_64
/* if long > 32 bits, check for overflow of int4 */
! || val != (long) ((int32) val)
#endif
)
return false;
if (result)
! *result = (int) val;
return true;
}
***************
*** 348,353 ****
res = (struct config_generic **)
! bsearch((void *)&key,
! (void *)conf_variables,
(size_t) num_conf_variables,
sizeof(struct config_generic *),
--- 354,359 ----
res = (struct config_generic **)
! bsearch((void *) &key,
! (void *) conf_variables,
(size_t) num_conf_variables,
sizeof(struct config_generic *),
***************
*** 417,421 ****
struct config_bool *conf = (struct config_bool *) record;
! return (void *)conf->variable;
/* break; */
}
--- 423,427 ----
struct config_bool *conf = (struct config_bool *) record;
! return (void *) conf->variable;
/* break; */
}
***************
*** 424,428 ****
struct config_int *conf = (struct config_int *) record;
! return (void *)conf->variable;
/* break; */
}
--- 430,434 ----
struct config_int *conf = (struct config_int *) record;
! return (void *) conf->variable;
/* break; */
}
***************
*** 431,435 ****
struct config_real *conf = (struct config_real *) record;
! return (void *)conf->variable;
/* break; */
}
--- 437,441 ----
struct config_real *conf = (struct config_real *) record;
! return (void *) conf->variable;
/* break; */
}
***************
*** 438,442 ****
struct config_string *conf = (struct config_string *) record;
! return (void *)*conf->variable;
/* break; */
}
--- 444,448 ----
struct config_string *conf = (struct config_string *) record;
! return (void *) *conf->variable;
/* break; */
}
***************
*** 485,489 ****
{
struct config_int *conf = (struct config_int *) record;
! int newval=0;
if (value)
--- 491,495 ----
{
struct config_int *conf = (struct config_int *) record;
! int newval = 0;
if (value)
***************
*** 565,569 ****
{
{
! (const char *)"vac_frequency", /* conf name */
gettext_noop("Sets how many cleanup cycles to run before a vacuum is done"), /* short desc */
gettext_noop("Sets how many cleanup cycles to run before a vacuum is done"), /* long desc */
--- 571,575 ----
{
{
! (const char *) "vac_frequency", /* conf name */
gettext_noop("Sets how many cleanup cycles to run before a vacuum is done"), /* short desc */
gettext_noop("Sets how many cleanup cycles to run before a vacuum is done"), /* long desc */
***************
*** 577,581 ****
{
{
! (const char *)"log_level",
gettext_noop("debug log level"),
gettext_noop("debug log level"),
--- 583,587 ----
{
{
! (const char *) "log_level",
gettext_noop("debug log level"),
gettext_noop("debug log level"),
***************
*** 589,593 ****
{
{
! (const char *)"sync_interval",
gettext_noop("sync event interval"),
gettext_noop("sync event interval in ms"),
--- 595,599 ----
{
{
! (const char *) "sync_interval",
gettext_noop("sync event interval"),
gettext_noop("sync event interval in ms"),
***************
*** 601,605 ****
{
{
! (const char *)"sync_interval_timeout",
gettext_noop("sync interval time out"),
gettext_noop("sync interval time out"),
--- 607,611 ----
{
{
! (const char *) "sync_interval_timeout",
gettext_noop("sync interval time out"),
gettext_noop("sync interval time out"),
***************
*** 613,617 ****
{
{
! (const char *)"sync_group_maxsize",
gettext_noop("sync group"),
gettext_noop("sync group"),
--- 619,623 ----
{
{
! (const char *) "sync_group_maxsize",
gettext_noop("sync group"),
gettext_noop("sync group"),
***************
*** 625,629 ****
{
{
! (const char *)"desired_sync_time",
gettext_noop("maximum time planned for grouped SYNCs"),
gettext_noop("If replication is behind, slon will try to increase numbers of "
--- 631,635 ----
{
{
! (const char *) "desired_sync_time",
gettext_noop("maximum time planned for grouped SYNCs"),
gettext_noop("If replication is behind, slon will try to increase numbers of "
***************
*** 640,644 ****
{
{
! (const char *)"syslog",
gettext_noop("Uses syslog for logging."),
gettext_noop("If this parameter is 1, messages go both to syslog "
--- 646,650 ----
{
{
! (const char *) "syslog",
gettext_noop("Uses syslog for logging."),
gettext_noop("If this parameter is 1, messages go both to syslog "
***************
*** 656,660 ****
{
{
! (const char *)"quit_sync_provider",
gettext_noop("Node to watch for a final SYNC"),
gettext_noop("We want to terminate slon when the worker thread reaches a certain SYNC number "
--- 662,666 ----
{
{
! (const char *) "quit_sync_provider",
gettext_noop("Node to watch for a final SYNC"),
gettext_noop("We want to terminate slon when the worker thread reaches a certain SYNC number "
***************
*** 669,673 ****
{
{
! (const char *)"quit_sync_finalsync",
gettext_noop("SYNC number at which slon should abort"),
gettext_noop("We want to terminate slon when the worker thread reaches a certain SYNC number "
--- 675,679 ----
{
{
! (const char *) "quit_sync_finalsync",
gettext_noop("SYNC number at which slon should abort"),
gettext_noop("We want to terminate slon when the worker thread reaches a certain SYNC number "
***************
*** 682,718 ****
{
{
! (const char *)"sync_max_rowsize", /* conf name */
! gettext_noop("sl_log_? rows larger than that are read separately"), /* short desc */
! gettext_noop("sl_log_? rows larger than that are read separately"), /* long desc */
SLON_C_INT /* config type */
},
! &sync_max_rowsize, /* var name */
! 8192, /* default val */
! 1024, /* min val */
! 32768 /* max val */
},
{
{
! (const char *)"sync_max_largemem", /* conf name */
gettext_noop("How much memory to allow for sl_log_? rows exceeding sync_max_rowsize"), /* short desc */
gettext_noop("How much memory to allow for sl_log_? rows exceeding sync_max_rowsize"), /* long desc */
SLON_C_INT /* config type */
},
! &sync_max_largemem, /* var name */
! 5242880, /* default val */
! 1048576, /* min val */
! 1073741824 /* max val */
},
{
{
! (const char *)"remote_listen_timeout", /* conf name */
gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"), /* short desc */
gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"), /* long desc */
SLON_C_INT /* config type */
},
! &remote_listen_timeout, /* var name */
300, /* default val */
! 30, /* min val */
30000 /* max val */
},
--- 688,724 ----
{
{
! (const char *) "sync_max_rowsize", /* conf name */
! gettext_noop("sl_log_? rows larger than that are read separately"), /* short desc */
! gettext_noop("sl_log_? rows larger than that are read separately"), /* long desc */
SLON_C_INT /* config type */
},
! &sync_max_rowsize, /* var name */
! 8192, /* default val */
! 1024, /* min val */
! 32768 /* max val */
},
{
{
! (const char *) "sync_max_largemem", /* conf name */
gettext_noop("How much memory to allow for sl_log_? rows exceeding sync_max_rowsize"), /* short desc */
gettext_noop("How much memory to allow for sl_log_? rows exceeding sync_max_rowsize"), /* long desc */
SLON_C_INT /* config type */
},
! &sync_max_largemem, /* var name */
! 5242880, /* default val */
! 1048576, /* min val */
! 1073741824 /* max val */
},
{
{
! (const char *) "remote_listen_timeout", /* conf name */
gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"), /* short desc */
gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"), /* long desc */
SLON_C_INT /* config type */
},
! &remote_listen_timeout, /* var name */
300, /* default val */
! 30, /* min val */
30000 /* max val */
},
***************
*** 726,732 ****
{
{
! (const char *)"log_pid", /* conf name */
! gettext_noop("Should logs include PID?"), /* short desc */
! gettext_noop("Should logs include PID?"), /* long desc */
SLON_C_BOOL /* config type */
},
--- 732,738 ----
{
{
! (const char *) "log_pid", /* conf name */
! gettext_noop("Should logs include PID?"), /* short desc */
! gettext_noop("Should logs include PID?"), /* long desc */
SLON_C_BOOL /* config type */
},
***************
*** 736,740 ****
{
{
! (const char *)"log_timestamp",
gettext_noop("Should logs include timestamp?"),
gettext_noop("Should logs include timestamp?"),
--- 742,746 ----
{
{
! (const char *) "log_timestamp",
gettext_noop("Should logs include timestamp?"),
gettext_noop("Should logs include timestamp?"),
***************
*** 747,751 ****
{
{
! (const char *)"cleanup_deletelogs",
gettext_noop("Should the cleanup thread DELETE sl_log_? entries or not"),
gettext_noop("Should the cleanup thread DELETE sl_log_? entries or not"),
--- 753,757 ----
{
{
! (const char *) "cleanup_deletelogs",
gettext_noop("Should the cleanup thread DELETE sl_log_? entries or not"),
gettext_noop("Should the cleanup thread DELETE sl_log_? entries or not"),
***************
*** 763,767 ****
{
{
! (const char *)"real_placeholder", /* conf name */
gettext_noop("place holder"), /* short desc */
gettext_noop("place holder"), /* long desc */
--- 769,773 ----
{
{
! (const char *) "real_placeholder", /* conf name */
gettext_noop("place holder"), /* short desc */
gettext_noop("place holder"), /* long desc */
***************
*** 780,784 ****
{
{
! (const char *)"cluster_name", /* conf name */
gettext_noop("Name of the replication cluster"), /* short desc */
NULL, /* long desc */
--- 786,790 ----
{
{
! (const char *) "cluster_name", /* conf name */
gettext_noop("Name of the replication cluster"), /* short desc */
NULL, /* long desc */
***************
*** 790,794 ****
{
{
! (const char *)"conn_info",
gettext_noop("connection info string"),
NULL,
--- 796,800 ----
{
{
! (const char *) "conn_info",
gettext_noop("connection info string"),
NULL,
***************
*** 800,804 ****
{
{
! (const char *)"pid_file",
gettext_noop("Where to write the pid file"),
NULL,
--- 806,810 ----
{
{
! (const char *) "pid_file",
gettext_noop("Where to write the pid file"),
NULL,
***************
*** 810,814 ****
{
{
! (const char *)"log_timestamp_format",
gettext_noop("A strftime()-style log timestamp format string."),
NULL,
--- 816,820 ----
{
{
! (const char *) "log_timestamp_format",
gettext_noop("A strftime()-style log timestamp format string."),
NULL,
***************
*** 820,824 ****
{
{
! (const char *)"archive_dir",
gettext_noop("Where to drop the sync archive files"),
NULL,
--- 826,830 ----
{
{
! (const char *) "archive_dir",
gettext_noop("Where to drop the sync archive files"),
NULL,
***************
*** 830,834 ****
{
{
! (const char *)"sql_on_connection",
gettext_noop("SQL to send to each connected node upon "
"connection establishment, useful to enable "
--- 836,840 ----
{
{
! (const char *) "sql_on_connection",
gettext_noop("SQL to send to each connected node upon "
"connection establishment, useful to enable "
***************
*** 845,849 ****
{
{
! (const char *)"lag_interval",
gettext_noop("A PostgreSQL value compatible with ::interval "
"which indicates how far behind this node should "
--- 851,855 ----
{
{
! (const char *) "lag_interval",
gettext_noop("A PostgreSQL value compatible with ::interval "
"which indicates how far behind this node should "
***************
*** 858,867 ****
{
{
! (const char *)"command_on_logarchive",
gettext_noop("Command to run (probably a shell script) "
! "every time a log archive is committed. "
! "This command will be passed one parameter: "
! "The full pathname of the archive file"
! ),
NULL,
SLON_C_STRING
--- 864,873 ----
{
{
! (const char *) "command_on_logarchive",
gettext_noop("Command to run (probably a shell script) "
! "every time a log archive is committed. "
! "This command will be passed one parameter: "
! "The full pathname of the archive file"
! ),
NULL,
SLON_C_STRING
***************
*** 875,879 ****
{
{
! (const char *)"syslog_facility",
gettext_noop("Sets the syslog \"facility\" to be used when syslog enabled."),
gettext_noop("Valid values are LOCAL0, LOCAL1, LOCAL2, LOCAL3, "
--- 881,885 ----
{
{
! (const char *) "syslog_facility",
gettext_noop("Sets the syslog \"facility\" to be used when syslog enabled."),
gettext_noop("Valid values are LOCAL0, LOCAL1, LOCAL2, LOCAL3, "
***************
*** 886,890 ****
{
{
! (const char *)"syslog_ident",
gettext_noop("Sets the program name used to identify slon messages in syslog."),
NULL,
--- 892,896 ----
{
{
! (const char *) "syslog_ident",
gettext_noop("Sets the program name used to identify slon messages in syslog."),
NULL,
***************
*** 897,901 ****
{
{
! (const char *)"cleanup_interval",
gettext_noop("A PostgreSQL value compatible with ::interval "
"which indicates what aging interval should be used "
--- 903,907 ----
{
{
! (const char *) "cleanup_interval",
gettext_noop("A PostgreSQL value compatible with ::interval "
"which indicates what aging interval should be used "
***************
*** 912,919 ****
/*
* Local Variables:
! * tab-width: 4
! * c-indent-level: 4
! * c-basic-offset: 4
* End:
*/
-
--- 918,924 ----
/*
* Local Variables:
! * tab-width: 4
! * c-indent-level: 4
! * c-basic-offset: 4
* End:
*/
- Previous message: [Slony1-commit] slony1-engine/src/slon/port win32service.c win32service.h
- Next message: [Slony1-commit] slony1-engine/src/slon remote_listen.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list