Marcus Gustafsson marcus.gustafsson at visionten.net
Thu Dec 13 00:17:05 PST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi again.

I've managed to figure out where it breaks now. It seems there is a bug
when you have the archive directory enabled and remote_worker.c tries to
log the "delete from %s;copy %s %s from stdin;" query on line 2883.
The archive_fp pointer which should contain the file pointer for the
archive log is NULL which terminates the thread.

I did (of course after finding exactly where it breaks) find the note
that the log shipping code didn't become stable until 1.2.11 which
explains why it wasn't fixed in the slony I was using.
As I won't actually be needing the log shipping function I'll just turn
it off for now, but hopefully this answer might be of help of someone else.

Regards,
 Marcus

Marcus Gustafsson skrev:
> Hi guys!
> 
> We are running a cluster of 2 (soon to be three) servers using
> slony1-1.1.5-1 with PostgreSQL 8.1.9.
> I have run in to a problem when trying to add the third node though.
> To create the new node I did:
> 
> * Extracted the database schema using slony1_extract_schema.sh (on the
>   master)
> * Created the database and all users involved on the new node
> * Installed the schema extracted in the first step
> * Ran slonik manually to initialize the node (store
>   node(id=3,comment='Second slave')
> * Started a local slon process checking the logs that it attached
> * Ran slonik manually to add the new storage paths (a bunch of
>   store path (...)
> * Noticed that syncs started to appear in the slon log (although not
>   acted upon as I yet had to subscribe the node)
> * Ran slonik manually to subscribe the new node (subscribe set
>   (id=1,provider=1,receiver=3,forward=yes))
> 
> After this I noticed that slon started to copy data (as intended) for
> each of the tables, but it never actually managed to start as it breaks
> on the first table:
> 
> <snip>a lot of prepare to copy and successfull copying of sequences</snip>
> 
> 2007-12-11 04:23:12 CST DEBUG2 remoteWorkerThread_1: copy table
> "public"."fb_fy_account_history"
> 2007-12-11 04:23:12 CST DEBUG3 remoteWorkerThread_1: table
> "public"."fb_fy_account_history" does not require Slony-I serial key
> 2007-12-11 04:23:12 CST DEBUG2 remoteWorkerThread_1: Begin COPY of table
> "public"."fb_fy_account_history"
> NOTICE:  truncate of "public"."fb_fy_account_history" succeeded
> 2007-12-11 04:23:12 CST DEBUG1 slon: done
> 2007-12-11 04:23:12 CST DEBUG2 slon: remove pid file
> 2007-12-11 04:23:12 CST DEBUG2 slon: exit(0)
> 
> 
> This is with debug level set to 4.
> From searching on the web it seems that something breaks when slon tries
> to insert the data in the new tables, but how can I figure out where it
> breaks? Are there any higher debug levels or any smart tricks to figure
> out why and where the copying breaks?
> 
> Regards,
>  Marcus

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHYOqBzYC0ZmFVS9sRAvo3AJ0UtiNb3I81U1ZxfX28dujmshwcDACdH6ks
XsXh05EM5ATHgS0lm05sM7o=
=gZ0t
-----END PGP SIGNATURE-----


More information about the Slony1-general mailing list