slony1-engine.git
15 years agoBug 147
Steve Singer [Wed, 11 Aug 2010 21:10:16 +0000 (17:10 -0400)]
Bug 147
Remove TABLE ADD KEY from altperl scripts.
Slony-I 2.0.x does not support TABLE ADD KEY so we should not
be generating slonik scripts that try and use it.

Instead generate errors if we find instances where it is required

15 years ago Fix for bug #127.
Steve Singer [Wed, 11 Aug 2010 20:59:51 +0000 (16:59 -0400)]
Fix for bug #127.
    Generation of syns on leaf nodes (nodes that are not set origins) were disabled some time ago. This reverts
    that commit and re-enables them

15 years ago Fix for Bug #120.
Steve Singer [Wed, 11 Aug 2010 20:56:23 +0000 (16:56 -0400)]
Fix for Bug #120.
    Call enableNode as part of the CLONE NODE processing. This will start the worker thread for the cloned node.

15 years agoUpdating release notes with recent commits
Steve Singer [Fri, 6 Aug 2010 18:24:49 +0000 (14:24 -0400)]
Updating release notes with recent commits

15 years ago Fix for bug # 122
Steve Singer [Fri, 6 Aug 2010 18:12:32 +0000 (14:12 -0400)]
Fix for bug # 122

    Print a better error message when using a receiver node id that does not exist

15 years agoMake scripts executable, as in commit 205e849c10d41fffac24f1401cfaa9507b7dd03c
Christopher Browne [Thu, 5 Aug 2010 15:27:53 +0000 (11:27 -0400)]
Make scripts executable, as in commit 205e849c10d41fffac24f1401cfaa9507b7dd03c

15 years agoBug #141 - removing alterTableRestore(), obsolete as of 2.0
Christopher Browne [Thu, 5 Aug 2010 15:22:55 +0000 (11:22 -0400)]
Bug #141 - removing alterTableRestore(), obsolete as of 2.0

15 years agoadd generated scan.h files to .gitignore
Christopher Browne [Thu, 5 Aug 2010 15:20:45 +0000 (11:20 -0400)]
add generated scan.h files to .gitignore

15 years agoDocumentation updates. Mostly typos and minor corrections.
Steve Singer [Wed, 4 Aug 2010 14:13:48 +0000 (10:13 -0400)]
Documentation updates. Mostly typos and minor corrections.
These changes are based on a list of issues submitted by
Tomonari Katsumata, NTT Open Source Software Center

Thanks

15 years agoFixed some broken logic in failedNode()
Steve Singer [Thu, 29 Jul 2010 15:37:44 +0000 (11:37 -0400)]
Fixed some broken logic in failedNode()

It apparently never supported failing over to nodes that are not
a direct subscriber to the failed node.

Jan
(cherry picked from commit 2705654ec3dcb0381afef591756170c6de8f8ce2)

Conflicts:

src/backend/slony1_funcs.sql

15 years agocommit e86d296ae8c739018100306bcebeded80525f265 seems to have
Steve Singer [Wed, 28 Jul 2010 19:34:55 +0000 (15:34 -0400)]
commit e86d296ae8c739018100306bcebeded80525f265 seems to have
been a merge or replace of the master branch into REL_2_0_STABLE.

This is not what should have been intended as it erased numerous changes
that were only in the 2.0 branch that should be merged into master.

This commit will put those changes back into 2.0, it undoes parts of
e86d29 but leaves the CVS tags removed.

This commit also undoes some changes made in master (mostly documetnation)
that maybe should go in 2.0. If that is the case they will need to be
put back as seperate commits

This commit was prepared by going back to before e86d29 and redoing the
tag removal and .gitignore changes then merging in the other changes done to
REL_2_0_STABLE after.  This patche was then prepared to make the current
REL_2_0_STABLE look like the result.

15 years agoBug 140
Steve Singer [Thu, 22 Jul 2010 20:53:14 +0000 (16:53 -0400)]
Bug 140

The perl module is actually called DBD:Pg not DBI:Pg
Reported by Peter Eisentraut

15 years agoMerge branch 'REL_2_0_STABLE' of ssh://git.postgresql.org/slony1-engine into REL_2_0_...
Christopher Browne [Mon, 19 Jul 2010 19:31:31 +0000 (15:31 -0400)]
Merge branch 'REL_2_0_STABLE' of ssh://git.postgresql.org/slony1-engine into REL_2_0_STABLE

15 years agoPut in empty <!-- --> and /* */ to make 2.0 consistent with the
Christopher Browne [Mon, 19 Jul 2010 19:30:27 +0000 (15:30 -0400)]
Put in empty <!--  --> and /*   */ to make 2.0 consistent with the
other branches

15 years agoFix compile issues on win32
Steve Singer [Mon, 19 Jul 2010 14:29:04 +0000 (10:29 -0400)]
Fix compile issues on win32
Patch by Hiroshi Saito

15 years agoChris evidently didn't quite handle $Id$ removal correctly for 2.0
Christopher Browne [Mon, 19 Jul 2010 16:12:31 +0000 (12:12 -0400)]
Chris evidently didn't quite handle $Id$ removal correctly for 2.0
branch.  Removing /* and <-- lines that no longer have $Id$ tags.

15 years agoAncient README that references a wiki that Chris had installed several
Christopher Browne [Mon, 19 Jul 2010 16:10:03 +0000 (12:10 -0400)]
Ancient README that references a wiki that Chris had installed several
years ago on a firewall box that is now long dead

15 years agoRemove all CVS ID tags obsolete in Git
Christopher Browne [Fri, 16 Jul 2010 21:35:52 +0000 (17:35 -0400)]
Remove all CVS ID tags obsolete in Git

15 years agofixing output message per report by Gurjeet Singh
Steve Singer [Fri, 9 Jul 2010 13:31:22 +0000 (13:31 +0000)]
fixing output message per report by Gurjeet Singh

15 years agoFix script name in help text.
Devrim GUNDUZ [Fri, 9 Jul 2010 07:11:40 +0000 (07:11 +0000)]
Fix script name in help text.

15 years agoupdating release notes
Steve Singer [Wed, 7 Jul 2010 14:44:53 +0000 (14:44 +0000)]
updating release notes

15 years agorelease sl_config_lock before sleeping
Steve Singer [Wed, 7 Jul 2010 14:41:57 +0000 (14:41 +0000)]
release sl_config_lock before sleeping

See bug # 135, slon appeared to be waiting to get a sl_config_lock
that the same slon process was already holding.
slon kept sleeping waiting for a sync to catch up.
Not holding the lock when we sleep should allow
other threads to obtain the lock.

15 years agoLog shipping fixes
Steve Singer [Wed, 7 Jul 2010 14:38:51 +0000 (14:38 +0000)]
Log shipping fixes
-
-Proper fix for checking for the proper return code to indicate no files
are queued for processing. This will allow log_shipper to sleep waiting for
more work when no files are ready for processing.  The previous commit was
the wrong commit.

15 years agoLog shipping fixes
Steve Singer [Wed, 7 Jul 2010 14:32:50 +0000 (14:32 +0000)]
Log shipping fixes
-slony1_dump.sh now generates a .sql file that restores in replica mode
so triggers don't fire.  It will also truncate tables before restoring
to them
-Check for the proper return code to indicate no files are queued for
processing. This will allow log_shipper to sleep waiting for more work
when no files are ready for processing.

15 years agoUpdating release notes for bug #118
Steve Singer [Mon, 5 Jul 2010 15:07:10 +0000 (15:07 +0000)]
Updating release notes for bug #118

15 years agoIn 8.4 and above use TRUNCATE ONLY instead of TRUNCATE when
Steve Singer [Mon, 5 Jul 2010 15:04:40 +0000 (15:04 +0000)]
In 8.4 and above use TRUNCATE ONLY instead of TRUNCATE when
cleaning out tables before a subscription.  TRUNCATE ONLY
behaves as TRUNCTE did in 8.3.

This fixes bug # 118 - subscribing to a set with an inherited
table  where the inheriting table has a lower tab_id than the
parent table deletes all of the data in the parent table

15 years ago-Added slonik_add_node altperl script
Steve Singer [Wed, 30 Jun 2010 14:35:57 +0000 (14:35 +0000)]
-Added slonik_add_node altperl script

-Slonik_drop_node now takes an event node

-Changes to the message printed in slon_kill.

Patch by Gurjeet Singh

15 years agoFix for bug #43
Steve Singer [Wed, 30 Jun 2010 14:03:43 +0000 (14:03 +0000)]
Fix for bug #43
Use get_set more consistently in the perl tools.
Patch by Peter Eisentraut.

15 years agoFix for bug #104
Steve Singer [Mon, 28 Jun 2010 15:36:36 +0000 (15:36 +0000)]
Fix for bug #104
Check for NULL file descriptors before performing actions on them.

15 years agoRemoving extra characters at bottom of file REL_2_0_4
Steve Singer [Thu, 24 Jun 2010 21:13:57 +0000 (21:13 +0000)]
Removing extra characters at bottom of file

15 years agoUpdating supportted Pg versions
Steve Singer [Wed, 23 Jun 2010 20:03:24 +0000 (20:03 +0000)]
Updating supportted Pg versions

15 years agoUpdating release notes
Steve Singer [Wed, 23 Jun 2010 20:03:08 +0000 (20:03 +0000)]
Updating release notes

15 years agoMemory leak fixes submittedb by Ulrich Weber REL_2_0_4_RC2
Steve Singer [Tue, 1 Jun 2010 15:14:05 +0000 (15:14 +0000)]
Memory leak fixes submittedb by Ulrich Weber
http://lists.slony.info/pipermail/slony1-hackers/2010-April/000321.html

15 years agoUpdating version number to 2.0.4 REL_2_0_4_RC1
Steve Singer [Fri, 28 May 2010 13:22:52 +0000 (13:22 +0000)]
Updating version number to 2.0.4

No longer generate warning of a unsupported version with Pg 9.0

15 years agocheckin in a regenerated configure, the previous commit didn't reflect the cvs versio...
Steve Singer [Thu, 27 May 2010 20:42:31 +0000 (20:42 +0000)]
checkin in a regenerated configure, the previous commit didn't reflect the cvs version of some m4 files.  We really shouldn't have configure scripts in cvs

15 years agoRemove direct uses of yyleng and instead use the function yyget_leng()
Steve Singer [Thu, 27 May 2010 20:38:32 +0000 (20:38 +0000)]
Remove direct uses of yyleng and instead use the function yyget_leng()
More recent versions of flex have changed yyleng from an int to a size_t.
By using the function we will let the compiler do the conversion if required
on the function result.

We also add an explicit object for scan.o instead of including it at the
bottom of parser.y because we need to generate and include a header for
the scanner (scan.h) so we have the explicit(and correct) definitions of
the yyyget_leng() function.

A autoconf check to ensure that a version of flex with yyget_leng() is
available has also been added.

15 years agoDocumentation clarification, submitted by singh.gurjeet@gmail.com
Steve Singer [Tue, 25 May 2010 13:25:58 +0000 (13:25 +0000)]
Documentation clarification, submitted by singh.gurjeet@gmail.com

15 years agoClarifying documentation to be clear that 'DROP SCHEMA' must be
Steve Singer [Mon, 17 May 2010 18:20:05 +0000 (18:20 +0000)]
Clarifying documentation to be clear that 'DROP SCHEMA' must be
used to drop the slony schema.

15 years agoThe variable name is wrong (syntax error on execution). Switched to correct
Steve Singer [Mon, 17 May 2010 17:15:19 +0000 (17:15 +0000)]
The variable name is wrong (syntax error on execution).  Switched to correct
variable name

15 years agoBug # 119
Steve Singer [Thu, 13 May 2010 19:34:31 +0000 (19:34 +0000)]
Bug # 119

cloneNodeFinish() called updateRelOid() that was looking at tab_id in
sl_sequence but the column is named seq_id

Report/patch from Chirag Dave (cdave@ca.afilias.info)

15 years agoGet rid of *some* references to gborg, and point them to new website.
Devrim GUNDUZ [Mon, 3 May 2010 05:58:34 +0000 (05:58 +0000)]
Get rid of *some* references to gborg, and point them to new website.

15 years agoUpdate mailing list URL, and also add Lenny to supported platforms list.
Devrim GUNDUZ [Mon, 3 May 2010 05:47:39 +0000 (05:47 +0000)]
Update mailing list URL, and also add Lenny to supported platforms list.

15 years agoUpdate supported platforms list.
Devrim GUNDUZ [Mon, 3 May 2010 05:43:05 +0000 (05:43 +0000)]
Update supported platforms list.

15 years agoJan's patch for an issue reported on the mailing list where
Steve Singer [Fri, 30 Apr 2010 21:45:47 +0000 (21:45 +0000)]
Jan's patch for an issue reported on the mailing list where
tuples with large rows where causing data corruption (reported
as invalid utf8 characters) because the memory was freed while
it was still being used.

This issue was introduced with 1.176.2.8 on Feb 11 2010

15 years agoDocumentation fix: a 'wait for event' following a 'lock set' does not
Steve Singer [Wed, 21 Apr 2010 20:17:10 +0000 (20:17 +0000)]
Documentation fix: a 'wait for event' following a 'lock set' does not
actually work(no event to wait on).  You do not need to wait for the lock set
because once the 'lock set' returns you already have the lock.

15 years agoFix shebang, per #108.
Devrim GUNDUZ [Sun, 18 Apr 2010 09:12:42 +0000 (09:12 +0000)]
Fix shebang, per #108.

15 years agoFix sgml error.
Devrim GUNDUZ [Sat, 10 Apr 2010 12:40:16 +0000 (12:40 +0000)]
Fix sgml error.

15 years agoChanging label to match 2_0_3 instead of the generic 'stable' REL_2_0_3
Steve Singer [Fri, 9 Apr 2010 20:29:09 +0000 (20:29 +0000)]
Changing label to match 2_0_3 instead of the generic 'stable'

15 years agoCommit configure, after building it REL_2_0_3_RC4
Christopher Browne [Tue, 6 Apr 2010 20:45:13 +0000 (20:45 +0000)]
Commit configure, after building it

15 years agoLots of updates to release notes preparatory to 2.0.3 RC4
Christopher Browne [Tue, 6 Apr 2010 20:42:48 +0000 (20:42 +0000)]
Lots of updates to release notes preparatory to 2.0.3 RC4

15 years agoImprove comment about "missing function" - the problem could be that
Christopher Browne [Tue, 6 Apr 2010 20:12:14 +0000 (20:12 +0000)]
Improve comment about "missing function" - the problem could be that
libpq wasn't found, not just that you're on some grossly ancient version
of PostgreSQL

15 years agoDROP cloneNodePrepare if it exists because the return type might have changed.
Steve Singer [Tue, 6 Apr 2010 20:06:27 +0000 (20:06 +0000)]
DROP cloneNodePrepare if it exists because the return type might have changed.
Bug # 113 patch from Atte Peltomäki

15 years agoFixed some obsolete prerequisites.
David Fetter [Fri, 2 Apr 2010 16:31:21 +0000 (16:31 +0000)]
Fixed some obsolete prerequisites.

15 years agoAdd notes about bug#55 to release notes, regression test
Christopher Browne [Wed, 31 Mar 2010 18:08:29 +0000 (18:08 +0000)]
Add notes about bug#55 to release notes, regression test

15 years agoPerform a va_copy and use the copy in the loop that uses va_args.
Steve Singer [Wed, 31 Mar 2010 14:12:02 +0000 (14:12 +0000)]
Perform a va_copy and use the copy in the loop that uses va_args.
You are not allowed to use va_args multiple times.

Fix for bug # 55

Patch submitted by Paul Cannon

15 years agoslony1_extract_schema.sh will now compare the major versions of postgres and pg_dump
Steve Singer [Tue, 30 Mar 2010 18:05:17 +0000 (18:05 +0000)]
slony1_extract_schema.sh will now compare the major versions of postgres and pg_dump
to make sure they match.

Added slony1_extract_schema_for_upgrade.sh a wrapper script that will handle
the requried steps for getting a schema from an older postgres that can be
used as input to a newer version

Addresses bug # 114, merged from 1.2 branch

15 years agofile slony1_extract_for_upgrade.sh was added on branch REL_2_0_STABLE on 2010-03...
Steve Singer [Tue, 30 Mar 2010 17:58:51 +0000 (17:58 +0000)]
file slony1_extract_for_upgrade.sh was added on branch REL_2_0_STABLE on 2010-03-30 18:05:17 +0000

15 years agoUpdating comment to reflect reality.
Steve Singer [Tue, 30 Mar 2010 15:55:41 +0000 (15:55 +0000)]
Updating comment to reflect reality.
+ The below log message that should have been applied with the previous checkin
-------
Load the v84 slony1_funcs file when running on an 8.4 system.
This checks the autovacuum status in the proper way for 8.4

Bug 116
Patch submitted by Peter Eisentraut

15 years agomsg
Steve Singer [Tue, 30 Mar 2010 15:38:41 +0000 (15:38 +0000)]
msg

15 years agoAdd notes on recommending *not* suppressing WAL via synchronous_commit
Christopher Browne [Tue, 30 Mar 2010 15:28:38 +0000 (15:28 +0000)]
Add notes on recommending *not* suppressing WAL via synchronous_commit
GUC per discussion on list with Peter Geoghegan

15 years agoUpdate release notes
Christopher Browne [Thu, 11 Mar 2010 21:41:03 +0000 (21:41 +0000)]
Update release notes

15 years agoImprove error reporting to indicate DB conn info in case where failure is
Christopher Browne [Thu, 11 Mar 2010 21:40:08 +0000 (21:40 +0000)]
Improve error reporting to indicate DB conn info in case where failure is
due to bad conn info

15 years agoSPI_getbinval() was being passed a NULL, which PostgreSQL 8.5 no longer
Christopher Browne [Tue, 16 Feb 2010 16:57:48 +0000 (16:57 +0000)]
SPI_getbinval() was being passed a NULL, which PostgreSQL 8.5 no longer
accepts.  Add isnull variable in the relevant code block so there's a place
to stow the bool result.

Reason for this noted by Alvaro Herrera - thanks!

15 years agoFound a query that no longer runs in 9.0 because subqueries in updates
Christopher Browne [Fri, 12 Feb 2010 17:14:52 +0000 (17:14 +0000)]
Found a query that no longer runs in 9.0 because subqueries in updates
evidently can't reference the "parent" table

15 years agoMore revisions to release notes based on recent fixes
Christopher Browne [Thu, 11 Feb 2010 23:11:01 +0000 (23:11 +0000)]
More revisions to release notes based on recent fixes

15 years agoBug #106 - change error message for session configuration failure
Christopher Browne [Thu, 11 Feb 2010 23:09:18 +0000 (23:09 +0000)]
Bug #106 - change error message for session configuration failure

15 years agoGwyn Connor pointed out a sprintf() abuse...
Christopher Browne [Thu, 11 Feb 2010 20:50:45 +0000 (20:50 +0000)]
Gwyn Connor pointed out a sprintf() abuse...

When log entries are generated, we're passing outbuf both as buffer and as
a source of data.  Behaviour is undefined on some systems, notably including
Gentoo Linux.

Change:  Make sure there are buffers for the date + process, fill them, and
reference them.

15 years agoAdd release notes for recent changes
Christopher Browne [Thu, 11 Feb 2010 19:37:48 +0000 (19:37 +0000)]
Add release notes for recent changes

15 years ago"if" should be "else if", as noticed by Richard Yen
Christopher Browne [Thu, 11 Feb 2010 19:35:10 +0000 (19:35 +0000)]
"if" should be "else if", as noticed by Richard Yen

15 years agoMemory leak in remote worker, as found by Ulrich Weber
Christopher Browne [Thu, 11 Feb 2010 19:32:42 +0000 (19:32 +0000)]
Memory leak in remote worker, as found by Ulrich Weber

http://lists.slony.info/pipermail/slony1-hackers/2010-January/000292.html

Note that in 2.0, code has changed so that only some of the changes are
applicable

15 years agoBison/Flex FAQ addition as in HEAD
Christopher Browne [Thu, 11 Feb 2010 17:52:01 +0000 (17:52 +0000)]
Bison/Flex FAQ addition as in HEAD

15 years agoBug #110 - some quoting problems
Christopher Browne [Wed, 10 Feb 2010 22:50:51 +0000 (22:50 +0000)]
Bug #110 - some quoting problems

15 years agoRemove Emacs fodder from test scripts - bug #108
Christopher Browne [Wed, 10 Feb 2010 22:23:00 +0000 (22:23 +0000)]
Remove Emacs fodder from test scripts - bug #108

15 years agoChanged dbutils to use INT64_FORMAT and int64 for handling %L.
Christopher Browne [Wed, 9 Dec 2009 20:58:15 +0000 (20:58 +0000)]
Changed dbutils to use INT64_FORMAT and int64 for handling %L.

- Apply to 2.0

15 years agoApply Jan's buffer overflow fix to 2.0 branch
Christopher Browne [Wed, 9 Dec 2009 20:55:43 +0000 (20:55 +0000)]
Apply Jan's buffer overflow fix to 2.0 branch

15 years agoUse int64 rather than long long; that's what PG uses for xids...
Christopher Browne [Wed, 9 Dec 2009 20:50:07 +0000 (20:50 +0000)]
Use int64 rather than long long; that's what PG uses for xids...

15 years agoCapture autoconf change in release notes
Christopher Browne [Fri, 27 Nov 2009 20:32:19 +0000 (20:32 +0000)]
Capture autoconf change in release notes

15 years agoAdd an 8.5-ism...
Christopher Browne [Fri, 27 Nov 2009 20:19:50 +0000 (20:19 +0000)]
Add an 8.5-ism...

ScanKeywordLookup now expects 3 arguments.

Added an autoconf test to check to see if there's 1 or 3 arguments

Changed src/backend/slony1_funcs.c to use 1/3 arguments, as appropriate

15 years agoAdd bug #103 to release notes
Christopher Browne [Thu, 26 Nov 2009 18:10:58 +0000 (18:10 +0000)]
Add bug #103 to release notes

15 years agoBug #103: http://bugs.slony.info/bugzilla/show_bug.cgi?id=103
Christopher Browne [Thu, 26 Nov 2009 17:36:21 +0000 (17:36 +0000)]
Bug #103: bugs.slony.info/bugzilla/show_bug.cgi?id=103

As observed by Cyril Scetbon, we need to initialize snapshot values to
"1:1:", not "0:0:", as the latter is refused by the snapshot parser.

15 years agoRelease note updates (for 2.0.3 rc3)
Christopher Browne [Fri, 20 Nov 2009 20:01:30 +0000 (20:01 +0000)]
Release note updates (for 2.0.3 rc3)

15 years agoBug #95 - http://www.slony.info/bugzilla/show_bug.cgi?id=95 REL_2_0_3_RC3
Christopher Browne [Fri, 20 Nov 2009 19:36:43 +0000 (19:36 +0000)]
Bug #95 - slony.info/bugzilla/show_bug.cgi?id=95

There are two calls to the postgres function subscribeSet_int(integer, integer,
integer, boolean, boolean) in slony1-engine/src/slonik/slonik.c

Both calls do not pass in the last boolean input (the new OMIT COPY parameter)
and hence you get errors.  We have only seen it when using slonik_store_node
but looking at the code it could also happen in slonik_failed_node.

15 years agoBug #102
Christopher Browne [Wed, 18 Nov 2009 16:57:23 +0000 (16:57 +0000)]
Bug #102

http://www.slony.info/bugzilla/show_bug.cgi?id=102

If you have a configuration with 1 master and 2 or more slaves, and you have
all paths defined, slonik can hang during a failover.

In src/slonik/slonik.c, the slonik_failed_node function queries the sl_nodelock
table on each node to find the listener process responsible for that node and
stores it in nodeinfo.

Later in the function it loops through all the nodes, checking to see if the
listener responsible for that node has exited so it knows that slon has
restarted on that node.

Unfortunately, the query it uses just counts the number of processes that are
not that original pid. It obviously is expecting only one entry in the result
set (i.e., the replacement listener). If there are other listeners for other
nodes running on that node (as is the case when a second slave has a path
defined, for example), then that query may never return exactly 1.

The fix is to add the node number to the query, since then it finds the number
of processes that aren't the old listener that are assigned to that node. When
there is exactly 1 of those then the slon has restarted.

Per Michael Lee Squires @ whitepages.com

15 years agoBug #100 - http://www.slony.info/bugzilla/show_bug.cgi?id=100
Christopher Browne [Wed, 18 Nov 2009 16:48:06 +0000 (16:48 +0000)]
Bug #100 - slony.info/bugzilla/show_bug.cgi?id=100

Typo: column referred to tab_reloid when it should refer to seq_reloid

As reported by Shaun Jackson

16 years agoFix 8.4-ism as found by Jeff Trout...
Christopher Browne [Fri, 23 Oct 2009 21:18:52 +0000 (21:18 +0000)]
Fix 8.4-ism as found by Jeff Trout...

In a nutshell in the event loop we start a transaction, then if we are not an accept set event we lock the config lock table.  We then zero out query1. (this is in remote_worker.c).

The ENABLE_SUBSCRIPTION event runs in a while(true) loop.
First it executes query1 (which thanks to the above, is empty), then tries to copy_set.  If copy_set fails for whatever reason we ROLLBACK our local conn (query2) and then loop.

The problem with this is when we come back around in the next look we're outside of a transaction and one won't be started because query1 is reset.  This causes LOCK TABLE to barf on PG8.4.  You are forever stuck until you restart slon.  This also explains another problem I've seen a couple times.

We subscribe to a set with say 3 tables.
The initial subscription fails due to an earlier txn wait.
We copy the first table of hte set successfully.
Then the second table fails to copy due to some DDL issue (perhaps for some reason a PK or column is missing).  We issue a rollback but since we are not in a txn, nothing happens. The event does not suceed so we try again
What happens next is since our previous work wasn't rolled back slony sees we've already got teh deny trigger & friends on the first table and barfs.   Cue infinite loop fixed only by shutting down slon and playing with the sl_ tables.

This patch keeps a count of how many retries we've had on this copy_set.  If we are on retry > 0 then we re-issue a start transaction, set islolation, and lock the config table. My testing has showed that this works.

16 years agoMissed a fix to insert into sl_setsync; per Cyril Scetbon
Christopher Browne [Fri, 23 Oct 2009 15:32:55 +0000 (15:32 +0000)]
Missed a fix to insert into sl_setsync; per Cyril Scetbon

16 years agoBug #98 - need WAIT ON parameter in slonik code generated by slonik_move_set
Christopher Browne [Wed, 21 Oct 2009 13:32:59 +0000 (13:32 +0000)]
Bug #98 - need WAIT ON parameter in slonik code generated by slonik_move_set
altperl script.

http://www.slony.info/bugzilla/show_bug.cgi?id=98

16 years agoinsert into sl_setsync upon FAILOVER had values() clause based on the
Christopher Browne [Wed, 21 Oct 2009 13:06:33 +0000 (13:06 +0000)]
insert into sl_setsync upon FAILOVER had values() clause based on the
pre-2.0 schema; fix to use 2.0.

As reported by Cyril Scetbon, bug #97

16 years agoUPGRADE FUNCTIONS failing because functions had their return types changed.
Christopher Browne [Wed, 21 Oct 2009 12:53:15 +0000 (12:53 +0000)]
UPGRADE FUNCTIONS failing because functions had their return types changed.
Added in "DROP FUNCTION IF EXISTS" (fine in 8.3+) in
src/backend/slony1_funcs.sql to rectify this.

Problem reported by Glyn Astill

16 years agoAdd missing arg to subscribeset_int() call - per bug report on list
Christopher Browne [Wed, 23 Sep 2009 16:22:30 +0000 (16:22 +0000)]
Add missing arg to subscribeset_int() call - per bug report on list

16 years agoAs observed by Bernd Helmle, cloneNodePrepare returns an event ID, and
Christopher Browne [Wed, 23 Sep 2009 16:14:32 +0000 (16:14 +0000)]
As observed by Bernd Helmle, cloneNodePrepare returns an event ID, and
hence should return BIGINT

16 years agoAdd in 8.3 function to check what tables should be left unvacuumed
Christopher Browne [Mon, 31 Aug 2009 15:15:17 +0000 (15:15 +0000)]
Add in 8.3 function to check what tables should be left unvacuumed
(because autovac covers this)

16 years agoClarify that the EVENT NODE for STORE NODE must be an existing node, not
Christopher Browne [Tue, 25 Aug 2009 17:17:57 +0000 (17:17 +0000)]
Clarify that the EVENT NODE for STORE NODE must be an existing node, not
the newly-added node.

16 years agoChange default $LOGDIR, so that distros won't need to patch it.
Devrim GUNDUZ [Mon, 17 Aug 2009 22:21:38 +0000 (22:21 +0000)]
Change default $LOGDIR, so that distros won't need to patch it.

16 years agoFix init script, so that log directory path will match upstream.
Devrim GUNDUZ [Mon, 17 Aug 2009 21:20:00 +0000 (21:20 +0000)]
Fix init script, so that log directory path will match upstream.

16 years agoUpdate copyrights
Devrim GUNDUZ [Mon, 17 Aug 2009 17:09:59 +0000 (17:09 +0000)]
Update copyrights

16 years agoUpdate copyrights
Devrim GUNDUZ [Mon, 17 Aug 2009 16:56:09 +0000 (16:56 +0000)]
Update copyrights

16 years agoFix LOG_NAME_SUFFIX feature. Thanks to David Fetter and Andrew Dunstan. REL_2_0_3_RC2
Devrim GUNDUZ [Wed, 12 Aug 2009 20:52:20 +0000 (20:52 +0000)]
Fix LOG_NAME_SUFFIX feature. Thanks to David Fetter and Andrew Dunstan.

16 years agoFunctions that return event IDs need to be returning "bigint", not "int4"
Christopher Browne [Mon, 10 Aug 2009 22:25:40 +0000 (22:25 +0000)]
Functions that return event IDs need to be returning "bigint", not "int4"
or "integer"

16 years agoChange numerous cases where integer values are appended onto strings to
Christopher Browne [Mon, 10 Aug 2009 15:34:19 +0000 (15:34 +0000)]
Change numerous cases where integer values are appended onto strings to
specifically cast to text.  This addresses the issue where, in 8.3+,
casts aren't done as much implicitly