slony1-engine.git
12 years agoadditional dstring_free() to fix an additional memory leak in sync_helper
Steve Singer [Thu, 25 Jul 2013 19:30:06 +0000 (15:30 -0400)]
additional dstring_free() to fix an additional memory leak in sync_helper

12 years agomemory leak fixes in sync_helper
Steve Singer [Fri, 19 Jul 2013 19:36:16 +0000 (15:36 -0400)]
memory leak fixes in sync_helper

dstring_terminate does not call free() to deallocate memory dstring_free() does

12 years agodocumentation sgml fixes
Steve Singer [Fri, 19 Jul 2013 19:33:10 +0000 (15:33 -0400)]
documentation sgml fixes

12 years agoupdating minor upgrade instructions to reflect that slony server files are now versioned
Steve Singer [Fri, 19 Jul 2013 19:31:20 +0000 (15:31 -0400)]
updating minor upgrade instructions to reflect that slony server files are now versioned
and both versions can co-exist in the $libdir and $sharedir at the same time

12 years agodocumentation changes to reflect incompatibilities between slony 2.1.x and 2.2.0
Steve Singer [Fri, 19 Jul 2013 19:18:26 +0000 (15:18 -0400)]
documentation changes to reflect incompatibilities between slony 2.1.x and 2.2.0

12 years agodon't process a set if sl_setsync has the initial :1:1: snapshot id
Steve Singer [Thu, 18 Jul 2013 18:03:08 +0000 (14:03 -0400)]
don't process a set if sl_setsync has the initial :1:1: snapshot id
this snapshot id is reserved for setting up the value indicates that
an even (ie the ACCEPT_SET) is still pending.

Also be explicit about the origin this remote worker is querying
sl_setsync for.

12 years agobug 299 - put the WAKEUP event at the front of the event queue instead of the back.
Steve Singer [Fri, 12 Jul 2013 14:38:23 +0000 (10:38 -0400)]
bug 299 - put the WAKEUP event at the front of the event queue instead of the back.

This will prevent the remoteWorker thread for an old-origin from pulling
the set that was just moved if a SYNC event is already queued

12 years agoupdating release notes, bug 296,297,298
Steve Singer [Wed, 10 Jul 2013 17:27:21 +0000 (13:27 -0400)]
updating release notes, bug 296,297,298

12 years agoMerge branch 'bug298'
Steve Singer [Wed, 10 Jul 2013 17:23:56 +0000 (13:23 -0400)]
Merge branch 'bug298'

12 years agoMerge branch 'bug297'
Steve Singer [Wed, 10 Jul 2013 17:23:51 +0000 (13:23 -0400)]
Merge branch 'bug297'

12 years agoSmall fixes for failover code.
Jan Wieck [Wed, 10 Jul 2013 16:22:02 +0000 (12:22 -0400)]
Small fixes for failover code.

12 years agoremoving stray quote
Steve Singer [Fri, 5 Jul 2013 02:02:38 +0000 (22:02 -0400)]
removing stray quote

12 years agomore documentation items
Steve Singer [Fri, 5 Jul 2013 02:00:57 +0000 (22:00 -0400)]
more documentation items

12 years agoadd DDL_SCRIPT translation to the logshipping_toinsert
Steve Singer [Fri, 5 Jul 2013 02:00:12 +0000 (22:00 -0400)]
add DDL_SCRIPT translation to the logshipping_toinsert

12 years agoInitial version of a perl script to convert the new
Steve Singer [Thu, 3 Nov 2011 21:04:51 +0000 (17:04 -0400)]
Initial version of a perl script to convert the new
COPY protocol style log shipping files to pure
SQL ones (INSERT,UPDATE,DELETE,TRUNCATE..)

12 years agodocumentation updates for log shipping
Steve Singer [Thu, 4 Jul 2013 20:40:50 +0000 (16:40 -0400)]
documentation updates for log shipping

Make the slony_logshipper daemon have a proper page in the reference section
like slon and slonik.  Clean up the rest of the logshipping instructions to be
more of a set of instructions versus question/answer format.

12 years agobug 297 - fix test_slony_state-dbi.pl so that it works with PG 9.2
Steve Singer [Thu, 4 Jul 2013 17:19:24 +0000 (13:19 -0400)]
bug 297 - fix test_slony_state-dbi.pl so that it works with PG 9.2

Also fix the warning emails for sl_confirm and sl_event checks so that they
actually treat problem conditions as problems.

12 years agoAdd a test to LogShipping.js that tests DDL on logshipping nodes
Steve Singer [Thu, 4 Jul 2013 15:47:45 +0000 (11:47 -0400)]
Add a test to LogShipping.js that tests DDL on logshipping nodes

12 years agobug 298 - process DDL_SCRIPT events from the log shipper SQL files
Steve Singer [Wed, 3 Jul 2013 20:51:53 +0000 (16:51 -0400)]
bug 298 - process DDL_SCRIPT events from the log shipper SQL files

12 years agoimprove the error case detection of slony_logshipper
Steve Singer [Wed, 3 Jul 2013 20:50:42 +0000 (16:50 -0400)]
improve the error case detection of slony_logshipper

This commit will give a better error message when the log shipper connects to
a databse without the sl_archive_tracking tables.

12 years agoDocumentation fixes for EXECUTE SCRIPT
Steve Singer [Wed, 3 Jul 2013 20:50:16 +0000 (16:50 -0400)]
Documentation fixes for EXECUTE SCRIPT

12 years agoensure that the transactions are closed as part of the FAILOVER before doing a MOVE SET
Steve Singer [Tue, 2 Jul 2013 19:14:31 +0000 (15:14 -0400)]
ensure that the transactions are closed as part of the FAILOVER before doing a MOVE SET

There were some code paths that could leave a transaction open such that when we later
got to a second set or node the LOCK SET could fail.

Also remove an unused if condition

12 years agoSave the return code for the next iteration
Steve Singer [Fri, 28 Jun 2013 17:14:24 +0000 (13:14 -0400)]
Save the return code for the next iteration

If the moveSet fails as part of a failover we continue processing
for the other nodes.  This fix make sure that we remember any failures
and slonik will return a non-zero return code when finished

12 years agofixing unit test, issue a sync to make sure the nodes have
Steve Singer [Thu, 27 Jun 2013 20:34:54 +0000 (16:34 -0400)]
fixing unit test, issue a sync to make sure the nodes have
caught up before doing the compareDb

12 years agodocumentation updates (FAILOVER)
Steve Singer [Thu, 27 Jun 2013 19:29:34 +0000 (15:29 -0400)]
documentation updates (FAILOVER)

12 years agoremoving unused variables introduced in the previous commits
Steve Singer [Thu, 27 Jun 2013 17:56:02 +0000 (13:56 -0400)]
removing unused variables introduced in the previous commits

12 years agoDROP NODE will now pass all nodes being dropped to the stored functions and event
Steve Singer [Thu, 27 Jun 2013 16:58:22 +0000 (12:58 -0400)]
DROP NODE will now pass all nodes being dropped to the stored functions and event

This allows slony to detect if a provider that is being dropped
only provides the subscription to some other node that is also
being dropped.

Also update the unit tests to reflect the new method
of FAILOVER involving provider-only nodes

12 years agobug 296 - part 1 FAILOVER fixes
Steve Singer [Wed, 26 Jun 2013 15:31:19 +0000 (11:31 -0400)]
bug 296 - part 1 FAILOVER fixes

This change allows a non-origin node to be specified on the FAILOVER command
so that subscriptions for these nodes are not redirected to the backup node.

An array of all the failed nodes (in addition to the one being failed over at this
stage of the process) is now passed to many of the failover stored functions

This commit also adds the SiteFailover unit test that tests multiple nodes in a site
failing over when the cluster does not have a complete path network

12 years agoadding documentation note about 8.3 having different table names for pgbench
Steve Singer [Thu, 20 Jun 2013 21:22:54 +0000 (17:22 -0400)]
adding documentation note about 8.3 having different table names for pgbench

12 years agoremoving documentation note that applies to PG version prior to 8.0
Steve Singer [Thu, 20 Jun 2013 20:06:58 +0000 (16:06 -0400)]
removing documentation note that applies to PG version prior to 8.0
This version of slony requires at least 8.3

12 years agomore consistent documentation formatting
Steve Singer [Thu, 20 Jun 2013 19:54:52 +0000 (15:54 -0400)]
more consistent documentation formatting

12 years agobug 294 - fixing documentation error - we just added set 2
Steve Singer [Thu, 20 Jun 2013 19:52:48 +0000 (15:52 -0400)]
bug 294 - fixing documentation error - we just added set 2

12 years agoMerge branch 'master' of ssh://git.postgresql.org/slony1-engine
Jan Wieck [Fri, 7 Jun 2013 20:06:31 +0000 (16:06 -0400)]
Merge branch 'master' of ssh://git.postgresql.org/slony1-engine

12 years agoFix for bug291.
Jan Wieck [Fri, 7 Jun 2013 20:04:13 +0000 (16:04 -0400)]
Fix for bug291.

The apply trigger messed up the query if a row
was updated to all the same values in case a
table has a multi-column primary key.

12 years agoAdd a test case to trigger bug 291.
Jan Wieck [Fri, 7 Jun 2013 19:32:44 +0000 (15:32 -0400)]
Add a test case to trigger bug 291.

12 years agoVarlena material has shifted to new location
Christopher Browne [Fri, 7 Jun 2013 17:32:47 +0000 (13:32 -0400)]
Varlena material has shifted to new location

12 years agoonly include malloc.h on WIN32 - FREEBSD (and others?) have replaced malloc.h with... REL_2_2_0_B4
Steve Singer [Fri, 7 Jun 2013 11:53:43 +0000 (07:53 -0400)]
only include malloc.h on WIN32 - FREEBSD (and others?) have replaced malloc.h with stdlib.h

12 years agoupdating the name of the version for the functions in the win32 export file
Steve Singer [Thu, 6 Jun 2013 21:17:10 +0000 (17:17 -0400)]
updating the name of the version for the functions in the win32 export file

12 years agoadd PG VERSION based switch for HAS_LOOKUPEXPLICITNAMESPACE_2 to the MSVC config...
Steve Singer [Thu, 6 Jun 2013 21:03:25 +0000 (17:03 -0400)]
add PG VERSION based switch for HAS_LOOKUPEXPLICITNAMESPACE_2  to the MSVC config file

12 years agoinclude malloc.h - alloca() is defined here on win32
Steve Singer [Thu, 6 Jun 2013 20:47:52 +0000 (16:47 -0400)]
include malloc.h - alloca() is defined here on win32

12 years agoupdating versions for 2.2.0 beta 4
Steve Singer [Thu, 6 Jun 2013 20:10:11 +0000 (16:10 -0400)]
updating versions for 2.2.0 beta 4

12 years agoMerge branch 'execute-script-fixes'
Steve Singer [Thu, 6 Jun 2013 19:09:24 +0000 (15:09 -0400)]
Merge branch 'execute-script-fixes'

Conflicts:
RELEASE

12 years agorelease notes for bug 252
Steve Singer [Thu, 6 Jun 2013 19:05:33 +0000 (15:05 -0400)]
release notes for bug 252

12 years agoFix typo in '<event pending>' conninfo string.
Jan Wieck [Wed, 7 Dec 2011 15:56:42 +0000 (10:56 -0500)]
Fix typo in '<event pending>' conninfo string.

12 years agoChange the temporary conninfo on clone prepare to '<event pending>'
Jan Wieck [Tue, 6 Dec 2011 15:39:35 +0000 (10:39 -0500)]
Change the temporary conninfo on clone prepare to '<event pending>'
for consistency.

12 years agorelease notes update
Steve Singer [Thu, 6 Jun 2013 18:11:38 +0000 (14:11 -0400)]
release notes update

12 years agofixing merge error - string replacements in SQL
Steve Singer [Thu, 6 Jun 2013 15:26:30 +0000 (11:26 -0400)]
fixing merge error - string replacements in SQL

12 years agoMerge branch 'master' into execute-script-fixes
Steve Singer [Thu, 6 Jun 2013 15:20:58 +0000 (11:20 -0400)]
Merge branch 'master' into execute-script-fixes

Conflicts:
src/slonik/slonik.c

12 years agoupdating windows compile docs to mention PGVER
Steve Singer [Thu, 6 Jun 2013 14:55:01 +0000 (10:55 -0400)]
updating windows compile docs to mention PGVER

12 years agoSquashed commit of the following:
Steve Singer [Thu, 6 Jun 2013 14:47:01 +0000 (10:47 -0400)]
Squashed commit of the following:

commit 0d1c7738dc21f2c9e398b790d101f0024dab0a54
Author: Steve Singer <ssinger@ca.afilias.info>
Date:   Thu Jun 6 10:45:34 2013 -0400

    win32 makefile fixes for the PGVER variable

commit 9f2eed91d129304a0e67534c977394cce04492cf
Merge: c9a4687 86eac22
Author: Steve Singer <ssinger@ca.afilias.info>
Date:   Thu Jun 6 09:42:31 2013 -0400

    Merge remote-tracking branch 'origin/master' into pgcommon_22

commit c9a4687f8fa28cf93a417c0b0597b8c6bf65cea7
Author: Steve Singer <ssinger@ca.afilias.info>
Date:   Sun Jun 2 21:39:23 2013 -0400

    Link with pgcommon on win32 when building with PG 9.3+

commit abd5addee71a2fa55a634673730c2d1d18dfe8e9
Author: Steve Singer <ssinger@ca.afilias.info>
Date:   Sun Jun 2 21:31:37 2013 -0400

    expose HAVE_PGCOMMON to the slonik makefile so it can link in pgcommon if required

    Conflicts:
     configure.ac

commit 9217d72cdf740e7cb9ca7b540c3a7df334f81e0e
Author: Steve Singer <ssinger@ca.afilias.info>
Date:   Tue May 28 10:55:40 2013 -0400

    link with pgcommon in addition to pgport on PG 9.3+

    PG 9.3 introduces a new library called libpgcommon we need to link
    with this when we link with pgport.

12 years agouping version/beta number
Steve Singer [Fri, 31 May 2013 22:22:43 +0000 (18:22 -0400)]
uping version/beta number

12 years agoupdating release notes bug 290
Steve Singer [Fri, 31 May 2013 22:18:39 +0000 (18:18 -0400)]
updating release notes bug 290

12 years agoversioning all symbols in the shared library.
Steve Singer [Fri, 31 May 2013 22:17:41 +0000 (18:17 -0400)]
versioning all symbols in the shared library.

Slony 2.2 allows multiple versions of the shared library to be exist
on the filesystem($libdir) at once.  This means they can be loaded
into the same backend at once, but we need to ensure that the
exported symbols are unique

12 years agoMerge branch 'master' into execute-script-fixes
Steve Singer [Wed, 29 May 2013 21:13:09 +0000 (17:13 -0400)]
Merge branch 'master' into execute-script-fixes

12 years agoFix the slonik script scanner to accept two single quotes
Jan Wieck [Tue, 28 May 2013 19:05:23 +0000 (15:05 -0400)]
Fix the slonik script scanner to accept two single quotes
inside a single quoted string.

12 years agoMerge branch 'master' into execute-script-fixes
Jan Wieck [Tue, 28 May 2013 17:49:54 +0000 (13:49 -0400)]
Merge branch 'master' into execute-script-fixes

12 years agoupdating the release notes
Steve Singer [Mon, 27 May 2013 17:35:19 +0000 (13:35 -0400)]
updating the release notes

12 years agoWhen upgrading from an earlier version of 2.2 to a newer version of 2.2
Jan Wieck [Sun, 26 May 2013 14:54:40 +0000 (10:54 -0400)]
When upgrading from an earlier version of 2.2 to a newer version of 2.2
the old shared library (that now has the version number in its name) might
not still be present.  This change avoids having to call C functions as
part of the slonik queries done during a UPDATE FUNCTIONS script.

12 years agoFixing several compiler warnings (unused and
Jan Wieck [Mon, 27 May 2013 14:45:56 +0000 (10:45 -0400)]
Fixing several compiler warnings (unused and
possibly used uninitialized things).

12 years agoAdd SQL='string' option to EXECUTE SCRIPT.
Jan Wieck [Fri, 24 May 2013 19:04:32 +0000 (15:04 -0400)]
Add SQL='string' option to EXECUTE SCRIPT.

12 years agoSorting tokens and keywords.
Jan Wieck [Wed, 22 May 2013 15:55:16 +0000 (11:55 -0400)]
Sorting tokens and keywords.

12 years agoFixing the magic @STRING@ replacement so that a long line with
Jan Wieck [Wed, 22 May 2013 15:32:07 +0000 (11:32 -0400)]
Fixing the magic @STRING@ replacement so that a long line with
such a string crossing a 256 character boundary doesn't fail.

Closing FILE* after reading script files.

12 years agoMerge remote branch 'origin/master'
Jan Wieck [Thu, 16 May 2013 21:26:38 +0000 (17:26 -0400)]
Merge remote branch 'origin/master'

12 years agoMake log_truncate() SECURITY DEFINER.
Jan Wieck [Thu, 16 May 2013 17:37:35 +0000 (13:37 -0400)]
Make log_truncate() SECURITY DEFINER.

12 years agoMake log_truncate() SECURITY DEFINER.
postgres [Thu, 16 May 2013 17:37:35 +0000 (13:37 -0400)]
Make log_truncate() SECURITY DEFINER.

12 years agoUpdating release notes for bug 286
Steve Singer [Thu, 28 Mar 2013 15:43:12 +0000 (11:43 -0400)]
Updating release notes for bug 286

12 years agoBug 286 PG 9.3 now takes two arguments on LookupExplicitNamespace
Steve Singer [Mon, 18 Mar 2013 20:48:43 +0000 (16:48 -0400)]
Bug 286 PG 9.3 now takes two arguments on LookupExplicitNamespace

Add a configure check to determine if we have the 1 or 2 argument
version of LookupExplicitNamespace and pass the proper number
of arguments

12 years agoMerge branch 'master' of ssh://git.postgresql.org/slony1-engine REL_2_2_0_B3
Jan Wieck [Fri, 15 Feb 2013 16:08:07 +0000 (11:08 -0500)]
Merge branch 'master' of ssh://git.postgresql.org/slony1-engine

12 years agoAdd a regression test that ensures DDL is purging the apply cache.
Jan Wieck [Fri, 15 Feb 2013 14:53:59 +0000 (09:53 -0500)]
Add a regression test that ensures DDL is purging the apply cache.

12 years agoupdates to docs and win32 makefile for MS-Windows.
Steve Singer [Thu, 14 Feb 2013 19:50:40 +0000 (14:50 -0500)]
updates to docs and win32 makefile for MS-Windows.
(cherry picked from commit aee311a97a2b11ab4b555943ae0e49fb21c449ff)

Conflicts:

doc/adminguide/installation.sgml

12 years agofmgr_info() must be called in the applyCacheContext.
Jan Wieck [Wed, 13 Feb 2013 23:13:24 +0000 (18:13 -0500)]
fmgr_info() must be called in the applyCacheContext.

Subsequent calls using the FmgrInfo structure may add more
sub elements to the info. This will be allocated in the same
memory context, the fmgr_info() call was made in. That
context must exist at least long enough as the FmgrInfo
call itself exists.

12 years agofixing bug number
Steve Singer [Fri, 1 Feb 2013 15:43:27 +0000 (10:43 -0500)]
fixing bug number

12 years agoupdating to release 2.2.0 B3
Steve Singer [Thu, 31 Jan 2013 22:12:57 +0000 (17:12 -0500)]
updating to release 2.2.0 B3

12 years agoBug 285 fix move set race condition.
Steve Singer [Thu, 31 Jan 2013 22:10:30 +0000 (17:10 -0500)]
Bug 285 fix move set race condition.

During a move set it is possible on subscriber node, that isn't the
old or new origin, for remoteWorkerThread_$oldorigin to start
processing a SYNC event before the ACCEPT_SET is processed
by the remoteWorkerThread_$neworigin.  If the ACCEPT_SET
transaction then commits before the update sl_setsync
query is executed by the remoteWorkertThread_$oldorigin
the update will update a row for the new origin when
it intends to update the old origin.  This messes up
sl_setsync.

This change will add a condition to the WHERE clause so
a remoteWorkerThread won't UPDATE rows for a different
origin

12 years agoupdating documentation to list more recent postgresql versions
Steve Singer [Mon, 28 Jan 2013 20:28:31 +0000 (15:28 -0500)]
updating documentation to list more recent postgresql versions

12 years agoAdd release note material on bugs 273, 282
Christopher Browne [Thu, 24 Jan 2013 20:19:15 +0000 (15:19 -0500)]
Add release note material on bugs 273, 282

12 years agoMerge branch 'bug282'
Jan Wieck [Wed, 23 Jan 2013 15:49:47 +0000 (10:49 -0500)]
Merge branch 'bug282'

12 years agoMerge branch 'bug273'
Jan Wieck [Wed, 23 Jan 2013 15:49:17 +0000 (10:49 -0500)]
Merge branch 'bug273'

12 years agoBug #284 - fixes to tutorial
Christopher Browne [Thu, 17 Jan 2013 23:00:28 +0000 (18:00 -0500)]
Bug #284 - fixes to tutorial

12 years agoFix for bug273
Jan Wieck [Fri, 14 Dec 2012 20:01:31 +0000 (15:01 -0500)]
Fix for bug273

Do not force the event provider to be part of the providers
unless we don't find any provider at all otherwise.

12 years agoFix for bug282.
Jan Wieck [Fri, 14 Dec 2012 18:24:39 +0000 (13:24 -0500)]
Fix for bug282.

There was a problem with the new COPY protocol when
a data type or domain used in a replicated column
is not in slon's search_path. SPI does not provide
a mechanism to get the namespace name of a columns
data type.

Instead of adding explicit type casting to the apply
queries and handing the data in as TEXT Datums, we
now use the same technique that PL/pgSQL uses at
at least since 8.3 and convert the TEXT datums into
the requested data type ourselves.

12 years agoadditional cleanups for pgport find_my_exec support
Steve Singer [Fri, 7 Dec 2012 20:27:39 +0000 (15:27 -0500)]
additional cleanups for pgport find_my_exec support

Clean up configure messaging and avoid a compiler warning by
checking for HAVE_PGPORT after config.h is included
(cherry picked from commit be933801d527caa7c88df622b6ec351668189281)

Conflicts:

RELEASE
src/slonik/slonik.c

12 years agoAdd back in find_my_exec() support on platforms that include pgport.
Steve Singer [Fri, 7 Dec 2012 20:26:33 +0000 (15:26 -0500)]
Add back in find_my_exec() support on platforms that include pgport.
find_my_exec, a postgresql pgport function is again used to find the
location of the slonik binary to locate the share directory.
This is for installs where the install location is not known at
compile time.

Some distributions don't include pgport, this is disabled by default
if you compile with pgport support set to yes (a configure option/check)
then this will be enabled.

Patch submitted by Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
(cherry picked from commit b034434e6279da67008402575ed768a666b827a9)

Conflicts:

configure.ac

12 years agoAdd in code to recognize PostgreSQL 9.2 and accept it as a
Christopher Browne [Fri, 30 Nov 2012 22:18:10 +0000 (17:18 -0500)]
Add in code to recognize PostgreSQL 9.2 and accept it as a
supported version, rather than warning that we're not sure

Conflicts:
RELEASE
src/slonik/slonik.c

12 years agoadding altperl fixes to the release notes
Steve Singer [Mon, 12 Nov 2012 15:11:25 +0000 (10:11 -0500)]
adding altperl fixes to the release notes

12 years agoMerge remote branch 'lkmatsumura/altperl_master'
Steve Singer [Mon, 12 Nov 2012 15:06:24 +0000 (10:06 -0500)]
Merge remote branch 'lkmatsumura/altperl_master'

12 years agoupdating release to 2.2.0 b2
Steve Singer [Fri, 31 Aug 2012 13:14:31 +0000 (09:14 -0400)]
updating release to 2.2.0 b2

12 years agoCosmetic commit - trailling spaces
Luiz K. Matsumura [Thu, 8 Nov 2012 23:49:33 +0000 (21:49 -0200)]
Cosmetic commit - trailling spaces

removing trailling spaces

12 years agoBug fix, incorrect variable name
Luiz K. Matsumura [Thu, 8 Nov 2012 23:48:22 +0000 (21:48 -0200)]
Bug fix, incorrect variable name

temporary pgpass file without password because of this bug

12 years agoget_pid() will check to make sure the pid actually exists
Steve Singer [Thu, 8 Nov 2012 19:02:20 +0000 (14:02 -0500)]
get_pid() will check to make sure the pid actually exists

12 years agoinclude pidfile directory in the sample slon.conf
Steve Singer [Thu, 8 Nov 2012 18:03:05 +0000 (13:03 -0500)]
include pidfile directory in the sample slon.conf

12 years agoadd --only-node option to usage message
Steve Singer [Thu, 8 Nov 2012 18:02:18 +0000 (13:02 -0500)]
add --only-node option to usage message

12 years agoset the PGPASSWORD file to read-only, then close and unlink it
Steve Singer [Thu, 8 Nov 2012 17:58:42 +0000 (12:58 -0500)]
set the PGPASSWORD file to read-only, then close and unlink it

12 years agoImplementing pidfile to identify the main process of slony instance:
Luiz K. Matsumura [Wed, 7 Nov 2012 00:38:51 +0000 (22:38 -0200)]
Implementing pidfile to identify the main process of slony instance:

slon_tools.conf-sample - add configuration variables
  . $PIDFILE_DIR : directory where the pid files will be created (default: /var/run/slony1)
  . $PIDFILE_PREFIX : prefix to pidfiles of node instances (default: cluster name)

slon-tools.pm:
 . start_slon : changed to init slon daemon with -p pidfile and added a sleep time
    to give time to slon daemon initialize and create the pid file

 . get_pid: changed to read the pid file to get the pid number

slon_kill.pl:
  . change kill method of slon daemon to get_pid then use kill 15 instead 9 to
    slon daemon remove the pid file properly

slon_watchdog2.pl:
  . Add sleep time before first query status to avoid the watchdog kill slon_daemon
    just immediatelly they started
  . Do not try to kill slon proccess with 9.

12 years agoUsing PGPASSFILE environment variable instead of PGPASSWORD
Luiz K. Matsumura [Tue, 6 Nov 2012 19:26:44 +0000 (17:26 -0200)]
Using PGPASSFILE environment variable instead of PGPASSWORD

Using a temporary pgpass file to store password as recommended by Postgresql documentation

Thanks to Steve Singer review

12 years agoInit script sample using altperl routines
Luiz K. Matsumura [Fri, 26 Oct 2012 20:56:35 +0000 (18:56 -0200)]
Init script sample using altperl routines

Example of a start/stop service script using altperl and a
slon config file example

12 years agoslony_show_configuration can now return cluster name property
Luiz K. Matsumura [Fri, 26 Oct 2012 20:54:03 +0000 (18:54 -0200)]
slony_show_configuration can now return cluster name property

12 years agoNew Watchdog options - verbosity
Luiz K. Matsumura [Fri, 26 Oct 2012 20:53:13 +0000 (18:53 -0200)]
New Watchdog options - verbosity

Implementing new parameters on slon_tools.conf
WATCHDOG_VERSION : select watchdog to start
   1: slon_watchdog
   2: slon_watchdog2

WATCHDOG_VERBOSE: enable/disable verbosity of watchdog logs

START_WATCHDOG and SLEEP_TIME: just declaring since the funcionality
  was already implemented

slon_watchdog2: making the routine functional since some bugs was detected,
  routine updating as changes detected on slon_watchdog

12 years agoImplementing capability of kill only a node on slon_kill
Luiz K. Matsumura [Fri, 26 Oct 2012 20:34:20 +0000 (18:34 -0200)]
Implementing capability of kill only a node on slon_kill

New parameter to kill only processes of one node
Refactoring to create subroutines.
Adjust of commands to grant that they will be sorted by pid values

12 years agoChange get_pid to return the smallest pid
Luiz K. Matsumura [Fri, 26 Oct 2012 20:19:52 +0000 (18:19 -0200)]
Change get_pid to return the smallest pid

get_pid changed to return the smallest pid of processes that match
the regex, probably the main proccess