Wed Jan 6 11:17:32 PST 2010
- Previous message: [Slony1-general] strategy for running many EXECUTE SCRIPT calls
- Next message: [Slony1-general] double quotes getting removed in 2.0.3 rc3?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm testing Slony1-1.2.20 against PostgreSQL 8.4.1. Whenever I attempt to execute a script I get an error from slony that the slony trigger for the subscriber table does not exist. I can recreate this error reliably. Basically, I follow these steps: 1. Dump the master database (at this point there is no slony schema). 2. Import the dump into the slave database. 3. Initialize slony (including creating new slony schemas). 4. Create the replication set. 5. Start slon on both nodes. 6. Subscribe the slave. So far so good. Data replication works fine. 7. Execute a script that creates a store proc (or any statement). That's when I get the error. My slonik script does not use "only on <node>" for the "execute script" command, since I want this DDL to propagate from the master to all slaves. Interestingly enough, if I run ddlScript_Prepare_Int(1, -1) manually, I do not get any errors or notices, and sl_tables, pg_triggers and the replication set triggers look like expected. I can also reverse the changes by running ddlScript_Complete_Int(1, -1), without errors or notices, and the same tables and objects return to their expected states. I built slony on the boxes where it is running, against PG 8.4, with no errors and just the usual yacc warnings. BTW, this operation seems to work fine on PG 8.2 masters and slaves. I've found and applied the hack Jeff Trout suggested in http://lists.slony.info/pipermail/slony1-general/2009-December/010221.html, but that only bypasses the check for the table not being in an altered state. How that can be I can't determine, since a check of sl_tables shows tab_altered == t and the denyaccess trigger is on the slave table. The database log, with log_statement = all, does not show any previous activity on that table or trigger. Below is the relevant section of the slony log. Any help would be greatly appreciated. Thanks in advance, Bob Lunney ====================================== 2010-01-06 11:18:00 EST CONFIG main: slon version 1.2.20 starting up 2010-01-06 11:18:00 EST CONFIG main: local node id = 2 2010-01-06 11:18:00 EST CONFIG main: launching sched_start_mainloop 2010-01-06 11:18:00 EST CONFIG main: loading current cluster configuration 2010-01-06 11:18:00 EST CONFIG storeNode: no_id=1 no_comment='node 1' 2010-01-06 11:18:00 EST CONFIG storePath: pa_server=1 pa_client=2 pa_conninfo="host=db_1 dbname=slony user=slony" pa_connretry=10 2010-01-06 11:18:00 EST CONFIG storeListen: li_origin=1 li_receiver=2 li_provider=1 2010-01-06 11:18:00 EST CONFIG storeSet: set_id=1 set_origin=1 set_comment='Replication set 1' 2010-01-06 11:18:00 EST WARN remoteWorker_wakeup: node 1 - no worker thread 2010-01-06 11:18:00 EST CONFIG storeSubscribe: sub_set=1 sub_provider=1 sub_forward='t' 2010-01-06 11:18:00 EST WARN remoteWorker_wakeup: node 1 - no worker thread 2010-01-06 11:18:00 EST CONFIG enableSubscription: sub_set=1 2010-01-06 11:18:00 EST WARN remoteWorker_wakeup: node 1 - no worker thread 2010-01-06 11:18:00 EST CONFIG main: configuration complete - starting threads NOTICE: Slony-I: cleanup stale sl_nodelock entry for pid=14704 2010-01-06 11:18:00 EST CONFIG enableNode: no_id=1 2010-01-06 11:18:00 EST INFO Checking local node id 2010-01-06 11:18:00 EST INFO Found local node id 2010-01-06 11:18:00 EST INFO prepare for DDL script - set:1 onlyonnode:-1 NOTICE: Slony-I: alterTableRestore(): Table "public"."table_1" is not in altered state CONTEXT: SQL statement "SELECT "_slony".alterTableRestore( $1 )" PL/pgSQL function "ddlscript_prepare_int" line 46 at PERFORM 2010-01-06 11:18:00 EST ERROR remoteWorkerThread_1: "select "_slony".ddlScript_prepare_int(1, -1); " PGRES_FATAL_ERROR ERROR: trigger "_slony_denyaccess_1" for table "table_1" does not exist CONTEXT: SQL statement "drop trigger "_slony_denyaccess_1" on "public"."table_1"" PL/pgSQL function "altertablerestore" line 62 at EXECUTE statement SQL statement "SELECT "_slony".alterTableRestore( $1 )" PL/pgSQL function "ddlscript_prepare_int" line 46 at PERFORM 2010-01-06 11:18:00 EST ERROR remoteWorkerThread_1: DDL preparation failed - set 1 - only on node -1 2010-01-06 11:18:00 EST INFO remoteListenThread_1: disconnecting from 'host=db_1 dbname=slony user=slony' 2010-01-06 11:18:00 EST CONFIG main: slon version 1.2.20 starting up 2010-01-06 11:18:00 EST CONFIG main: local node id = 2 2010-01-06 11:18:00 EST CONFIG main: launching sched_start_mainloop
- Previous message: [Slony1-general] strategy for running many EXECUTE SCRIPT calls
- Next message: [Slony1-general] double quotes getting removed in 2.0.3 rc3?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list