Victoria Parsons Victoria.parsons
Fri Jul 23 14:09:58 PDT 2004
Hi all,
 
If I want to replicate from one machine to another do I need a full
installation on the slave machine aswell or a copy of some of the library
files, or neither?
 
When trying to run a slony_master_setup to replicate to a slave with only
standard postgresql I get:
"could not access file $libdir/xxid: No such file of folder"
"could not access file $libdir/slony1_funcs: No such file of folder" etc.
 
I assume these are because I need the files on the slave machine but do I
need a full install?
 
Thanks,
Vicki Parsons
 

-----Original Message-----
From: David Parker [mailto:dparker at tazznetworks.com]
Sent: 22 July 2004 18:31
To: Victoria Parsons; slony1-general at gborg.postgresql.org
Subject: RE: [Slony1-general] Beginners setup help


Hi. I'm just a beginning user myself, but I seem to recall running into your
first problem, "no worker thread", and the reason was that I had not
configured postgres (7.4.3) with the --enable-thread-safety switch (this is
on Solaris 8/9). You didn't mention what platform you are on or the version
of postgres you are using, but this is one thing to check, anyway. If you
are on Solaris, there is a patch to the postgres configure script that you
will need to apply to get the --enable-thread-safety to work. I can probably
find it and forward it to you, if you need it.
 
By default, the slony_setup.pl is assuming that you do not have an existing
slave database already, so the slony_master_setup.sh script it generates
tries to go and create it. The error you are seeing ( I ran into this as
well ) is because it is trying to insert into the pg_shadow table, which
stores db usernames, and you probably already have the username defined
there.
 
In my situation, I already have a fully defined database and schema on the
slave, so I edited slony_master_setup.sh to remove all of the psql commands
from the beginning, leaving just the slonik input. That worked out well, and
it's a big help having slony_setup.pl generate all the "set add table"
commands for you.
 
Good luck!
 
- DAP

  _____  

From: slony1-general-bounces at gborg.postgresql.org
[mailto:slony1-general-bounces at gborg.postgresql.org] On Behalf Of Victoria
Parsons
Sent: Thursday, July 22, 2004 12:30 PM
To: 'slony1-general at gborg.postgresql.org'
Subject: [Slony1-general] Beginners setup help



Hi there, 

I have spent most of the day trying to get slony up and running. I
configured and installed it with no problems, but I need some help setting
up a replicating system.

I have tried creating a replicating database by following the format of the
"replicating your first database" example in the supplied documentation.
This got me as far as having a copy of the master database tables with no
entries in. I ran a script like the example's to create a set and store
nodes and paths.

I then ran the command 
slon T1 dbname=usersdb user=postgres host=localhost    ..(redirect output) 
This seemed to produce promising results in the corresponding
slon-usersdb.out file: 

CONFIG main: local node id = 2 
CONFIG main: loading current cluster configuration 
CONFIG storeNode: no_id=1 no_comment='Node 1' 
CONFIG storePath: pa_server=1 pa_client=2 
pa_conninfo="dbname=usersdb host=localhost port=5432 
user=postgres password=postgres" pa_connretry=10 
CONFIG storeListen: li_origin=1 li_receiver=2 
li_provider=1 
CONFIG storeSet: set_id=1 set_origin=1 
set_comment='usersdb tables' 

However when I then did the same for my slave database I got these warnings
and errors: 

WARN   remoteWorker_wakeup: node 1 - no worker thread 
CONFIG storeSubscribe: suINFO   remoteListenThread_2: 
disconnecting from 'dbname=copy host=localhost 
port=5432 user=postgres password=postgres' 
 sub_set=1 
WARN   remoteWorker_wakeup: node 1 - no worker thread 
CONFIG main: configuration complete - starting threads 
CONFIG enableNode: no_id=1 
ERROR  remoteWorkerThread_1: "declare LOG cursor for 
select     log_origin, log_xid, log_tableid,    
log_actionseq, log_cmdtype, log_cmddata from 
"_T1".sl_log_1 where log_origin = 1 and (  order by 
log_actionseq; " PGRES_FATAL_ERROR ERROR:  syntax 
error at or near "order" at character 161 
ERROR  remoteWorkerThread_1: "close LOG; " 
PGRES_FATAL_ERROR ERROR:  current transaction is 
aborted, commands ignored until end of transaction 
block 
ERROR  remoteWorkerThread_1: helper 1 finished with 
error 
ERROR  remoteWorkerThread_1: SYNC aborted 



After this I tried using the slony_setup.pl script. This confused my a bit
because although I was prompted for which database I wanted to replicate I
wasn't prompted for a slave database name. Is this because it is expected
the the slave would be named the same but on a different computer? I tried
running the created slony_master_setup.sh script anyway and got

"ERROR: duplicate key violates unique constraint "pg_shadow_usename_index". 

Which is the best way to set-up a test database and can anybody help me make
it work. 

Thanks for your help, 
Vicki Parsons 



************************************************************************
This message should be regarded as confidential. If you have received this
email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy
by an authorised signatory.

Detica Limited is registered in England under No: 1337451 and Detica (Rubus)
Limited under No: 03361831.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP,
England.
************************************************************************


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gborg.postgresql.org/pipermail/slony1-general/attachments/20040723/1de9eb56/attachment-0001.html


More information about the Slony1-general mailing list