Skip to content

Commit

Permalink
Merge branch 'master' into bulk-adding
Browse files Browse the repository at this point in the history
  • Loading branch information
ssinger committed Jan 28, 2011
2 parents cb58823 + ff9f866 commit 0a2a7bc
Show file tree
Hide file tree
Showing 9 changed files with 376 additions and 173 deletions.
13 changes: 10 additions & 3 deletions RELEASE
@@ -1,23 +1,30 @@
Version TBD...

- Bug #126 - TCP KEEP alives can now be used from slon to postgresql(on by default)

- Bug #152 - eliminate debugging statements from DDL processing

- Bug #156 - add health check at slon startup time

- Bug #163 - change Slony-I tables to use TIMESTAMP WITH TIME ZONE rather than WITHOUT TIME ZONE

- Bug #167 - change queries against sl_log_* tables to avert slowdown when large backlog

- Bug #170 - remove SNMP support

- Bug #172 - add support for application_name GUC (in recent PG such as 9.0)

- Bug #180 - Created a slonik DATE command

- Bug #185 - change functions to use named parameters

- Bug #187 - add newline to slon PID files

- Bug #188 - test harness query had subquery returning multiple tuples

- Bug #180 - Created a slonik DATE command

- Bug #126 - TCP KEEP alives can now be used from slon to postgresql(on by default)
- Bug #193 - add back reset of vac_count so vacuums only done every few cleanup thread iterations

- Bug #189 - add slonik EXIT check for exit values 0..255, as that's all that Unix accepts

RELEASE 2.0.6

Expand Down
14 changes: 14 additions & 0 deletions doc/adminguide/slonconf.sgml
Expand Up @@ -136,6 +136,20 @@

<varlistentry id="slon-config-logging-log-timestamp-format" xreflabel="slon_conf_log_timestamp_format">
<term><varname>log_timestamp_format</varname> (<type>string</type>)</term>
<indexterm>
<primary><varname>explain_interval</varname> configuration parameter</primary>
</indexterm>
<listitem>
<para>An interval in seconds at which the remote worker thread will
output the query, used to select log rows from the data provider, together
with it's EXPLAIN query plan. The default value of 0 turns this feature off.
The allowed range is 0 (off) to 86400 (once per day).
</para>
</listitem>
</varlistentry>

<varlistentry id="slon-config-logging-explain-interval" xreflabel="slon_conf_explain_interval">
<term><varname>explain_interval</varname> (<type>integer</type>)</term>
<indexterm>
<primary><varname>log_timestamp_format</varname> configuration parameter</primary>
</indexterm>
Expand Down
8 changes: 7 additions & 1 deletion share/slon.conf-sample
Expand Up @@ -68,6 +68,12 @@
# Default is '%Y-%m-%d %H:%M:%S %Z'
#log_timestamp_format='%Y-%m-%d %H:%M:%S %Z'

# An interval in seconds at which the remote worker will output the
# query used to select log rows together with it's query plan. The
# default value of 0 turns this feature off.
# Range: [0-86400], default: 0
#explain_interval=0

# Where to write the pid file. Default: no pid file
#pid_file='/path/to/your/pidfile'

Expand Down Expand Up @@ -108,4 +114,4 @@
# lag_interval="8 minutes"

# Directory in which to stow sync archive files
# archive_dir="/tmp/somewhere"
# archive_dir="/tmp/somewhere"
2 changes: 2 additions & 0 deletions src/slon/cleanup_thread.c
Expand Up @@ -141,6 +141,8 @@ cleanupThread_main( /* @unused@ */ void *dummy)
{
unsigned long latest_xid;

vac_count = 0;

latest_xid = get_earliest_xid(dbconn);
vacuum_action = "";
if (earliest_xid == latest_xid)
Expand Down
13 changes: 13 additions & 0 deletions src/slon/confoptions.c
Expand Up @@ -721,6 +721,19 @@ static struct config_int ConfigureNamesInt[] =
30000 /* max val */
},

{
{
(const char *) "explain_interval", /* conf name */
gettext_noop("Interval in seconds in which the remote worker will report an explain of the log selection query"), /* short desc */
gettext_noop("Interval in seconds in which the remote worker will report an explain of the log selection query"), /* long desc */
SLON_C_INT /* config type */
},
&explain_interval, /* var name */
0, /* default val (never) */
0, /* min val */
86400 /* max val (1 day) */
},


{
{
Expand Down
13 changes: 13 additions & 0 deletions src/slon/dbutils.c
Expand Up @@ -22,6 +22,7 @@
#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <netinet/in.h>

Expand Down Expand Up @@ -94,14 +95,26 @@ slon_connectdb(char *conninfo, char *symname)
{

if(keep_alive_idle > 0)
#ifdef TCP_KEEPIDLE
setsockopt(PQsocket(dbconn),IPPROTO_TCP,TCP_KEEPIDLE,
&keep_alive_idle,sizeof(keep_alive_idle));
#else
slon_log(SLON_WARN,"keep_alive_idle is not supported on this platform");
#endif
if(keep_alive_interval > 0)
#ifdef TCP_KEEPINTVL
setsockopt(PQsocket(dbconn),IPPROTO_TCP,TCP_KEEPINTVL,
&keep_alive_interval,sizeof(keep_alive_interval));
#else
slon_log(SLON_WARN,"keep_alive_interval is not supported on this platform");
#endif
if(keep_alive_count > 0)
#ifdef TCP_KEEPCNT
setsockopt(PQsocket(dbconn),IPPROTO_TCP,TCP_KEEPCNT,
&keep_alive_count,sizeof(keep_alive_count));
#else
slon_log(SLON_WARN,"keep_alive_count is not supported on this platform");
#endif

}
#else
Expand Down

0 comments on commit 0a2a7bc

Please sign in to comment.