Tue Dec 11 11:30:32 PST 2007
- Previous message: [Slony1-commit] slony1-engine/src/slon remote_listen.c remote_worker.c
- Next message: [Slony1-commit] slony1-engine/src/slonik slonik.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/backend In directory main.slony.info:/tmp/cvs-serv26467/src/backend Modified Files: slony1_base.sql slony1_funcs.c slony1_funcs.sql Log Message: Adjustments for PostgreSQL 8.3 and moving to the now builtin txid data type. Jan Index: slony1_funcs.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** slony1_funcs.c 7 Jun 2007 13:01:10 -0000 1.62 --- slony1_funcs.c 11 Dec 2007 19:30:29 -0000 1.63 *************** *** 127,139 **** TransactionId newXid = GetTopTransactionId(); Slony_I_ClusterStatus *cs; - text *ev_xip; char *ev_type_c; ! Datum argv[12]; ! char nulls[13]; char *buf; size_t buf_size; int rc; - uint32 xcnt; - char *cp; int i; int64 retval; --- 127,136 ---- TransactionId newXid = GetTopTransactionId(); Slony_I_ClusterStatus *cs; char *ev_type_c; ! Datum argv[9]; ! char nulls[10]; char *buf; size_t buf_size; int rc; int i; int64 retval; *************** *** 173,225 **** /* - * Build the comma separated list of transactions in progress as Text - * datum. - */ - *(cp = buf) = '\0'; - /*@-nullderef@*/ - /*@-mustfreeonly@*/ - for (xcnt = 0; xcnt < SerializableSnapshot->xcnt; xcnt++) - { - if ((cp + 30) >= (buf + buf_size)) - { - buf_size *= 2; - buf = repalloc(buf, buf_size); - cp = buf + strlen(buf); - } - /*@-bufferoverflowhigh@*/ - sprintf(cp, "%s'%u'", (xcnt > 0) ? "," : "", - SerializableSnapshot->xip[xcnt]); - /*@+bufferoverflowhigh@*/ - cp += strlen(cp); - } - /*@+nullderef@*/ - /*@+mustfreeonly@*/ - ev_xip = DatumGetTextP(DirectFunctionCall1(textin, PointerGetDatum(buf))); - - /* * Call the saved INSERT plan */ - /*@-nullderef@*/ - argv[0] = TransactionIdGetDatum(SerializableSnapshot->xmin); - argv[1] = TransactionIdGetDatum(SerializableSnapshot->xmax); - /*@+nullderef@*/ - argv[2] = PointerGetDatum(ev_xip); - nulls[0] = ' '; - nulls[1] = ' '; - nulls[2] = ' '; for (i = 1; i < 10; i++) { if (i >= PG_NARGS() || PG_ARGISNULL(i)) { ! argv[i + 2] = (Datum)0; ! nulls[i + 2] = 'n'; } else { ! argv[i + 2] = PG_GETARG_DATUM(i); ! nulls[i + 2] = ' '; } } ! nulls[12] = '\0'; if ((rc = SPI_execp(cs->plan_insert_event, argv, nulls, 0)) < 0) --- 170,189 ---- /* * Call the saved INSERT plan */ for (i = 1; i < 10; i++) { if (i >= PG_NARGS() || PG_ARGISNULL(i)) { ! argv[i - 1] = (Datum)0; ! nulls[i - 1] = 'n'; } else { ! argv[i - 1] = PG_GETARG_DATUM(i); ! nulls[i - 1] = ' '; } } ! nulls[9] = '\0'; if ((rc = SPI_execp(cs->plan_insert_event, argv, nulls, 0)) < 0) *************** *** 840,847 **** * Construct the parameter array and insert the log row. */ ! argv[0] = TransactionIdGetDatum(cs->currentXid); ! argv[1] = Int32GetDatum(tab_id); ! argv[2] = PointerGetDatum(cmdtype); ! argv[3] = PointerGetDatum(cs->cmddata_buf); SPI_execp(cs->plan_active_log, argv, NULL, 0); --- 804,810 ---- * Construct the parameter array and insert the log row. */ ! argv[0] = Int32GetDatum(tab_id); ! argv[1] = PointerGetDatum(cmdtype); ! argv[2] = PointerGetDatum(cs->cmddata_buf); SPI_execp(cs->plan_active_log, argv, NULL, 0); *************** *** 1191,1197 **** char query[1024]; bool isnull; ! Oid plan_types[12]; ! Oid xxid_typid; ! TypeName *xxid_typename; /* --- 1154,1160 ---- char query[1024]; bool isnull; ! Oid plan_types[9]; ! Oid txid_snapshot_typid; ! TypeName *txid_snapshot_typname; /* *************** *** 1284,1300 **** { /* ! * Lookup the oid of our special xxid type */ ! xxid_typename = makeNode(TypeName); ! xxid_typename->names = ! lappend(lappend(NIL, makeString(NameStr(cs->clustername))), ! makeString("xxid")); ! #ifdef HAVE_TYPENAMETYPEID_2 ! xxid_typid = typenameTypeId(NULL,xxid_typename); ! #else ! xxid_typid = typenameTypeId(xxid_typename); ! #endif ! plan_types[0] = INT4OID; /* --- 1247,1258 ---- { /* ! * Lookup the oid of the txid_snapshot type */ ! txid_snapshot_typname = makeNode(TypeName); ! txid_snapshot_typname->names = ! lappend(lappend(NIL, makeString("pg_catalog")), ! makeString("txid_snapshot")); ! txid_snapshot_typid = typenameTypeId(NULL,txid_snapshot_typname, NULL); /* *************** *** 1307,1322 **** "INSERT INTO %s.sl_event " "(ev_origin, ev_seqno, " ! "ev_timestamp, ev_minxid, ev_maxxid, ev_xip, " "ev_type, ev_data1, ev_data2, ev_data3, ev_data4, " "ev_data5, ev_data6, ev_data7, ev_data8) " "VALUES ('%d', nextval('%s.sl_event_seq'), " ! "now(), $1, $2, $3, " ! "$4, $5, $6, $7, $8, $9, $10, $11, $12); " "SELECT currval('%s.sl_event_seq');", cs->clusterident, cs->clusterident, cs->localNodeId, cs->clusterident, cs->clusterident); ! plan_types[0] = xxid_typid; ! plan_types[1] = xxid_typid; plan_types[2] = TEXTOID; plan_types[3] = TEXTOID; --- 1265,1280 ---- "INSERT INTO %s.sl_event " "(ev_origin, ev_seqno, " ! "ev_timestamp, ev_snapshot, " "ev_type, ev_data1, ev_data2, ev_data3, ev_data4, " "ev_data5, ev_data6, ev_data7, ev_data8) " "VALUES ('%d', nextval('%s.sl_event_seq'), " ! "now(), \"pg_catalog\".txid_current_snapshot(), $1, $2, " ! "$3, $4, $5, $6, $7, $8, $9); " "SELECT currval('%s.sl_event_seq');", cs->clusterident, cs->clusterident, cs->localNodeId, cs->clusterident, cs->clusterident); ! plan_types[0] = TEXTOID; ! plan_types[1] = TEXTOID; plan_types[2] = TEXTOID; plan_types[3] = TEXTOID; *************** *** 1326,1334 **** plan_types[7] = TEXTOID; plan_types[8] = TEXTOID; - plan_types[9] = TEXTOID; - plan_types[10] = TEXTOID; - plan_types[11] = TEXTOID; ! cs->plan_insert_event = SPI_saveplan(SPI_prepare(query, 12, plan_types)); if (cs->plan_insert_event == NULL) elog(ERROR, "Slony-I: SPI_prepare() failed"); --- 1284,1289 ---- plan_types[7] = TEXTOID; plan_types[8] = TEXTOID; ! cs->plan_insert_event = SPI_saveplan(SPI_prepare(query, 9, plan_types)); if (cs->plan_insert_event == NULL) elog(ERROR, "Slony-I: SPI_prepare() failed"); *************** *** 1365,1410 **** { /* - * Lookup the oid of our special xxid type - */ - xxid_typename = makeNode(TypeName); - xxid_typename->names = - lappend(lappend(NIL, makeString(NameStr(cs->clustername))), - makeString("xxid")); - #ifdef HAVE_TYPENAMETYPEID_2 - xxid_typid = typenameTypeId(NULL, xxid_typename); - #else - xxid_typid = typenameTypeId(xxid_typename); - #endif - - /* * Create the saved plan's */ sprintf(query, "INSERT INTO %s.sl_log_1 " ! "(log_origin, log_xid, log_tableid, log_actionseq," " log_cmdtype, log_cmddata) " ! "VALUES (%d, $1, $2, nextval('%s.sl_action_seq')," ! " $3, $4);", cs->clusterident, cs->localNodeId, cs->clusterident); ! plan_types[0] = xxid_typid; ! plan_types[1] = INT4OID; plan_types[2] = TEXTOID; - plan_types[3] = TEXTOID; ! cs->plan_insert_log_1 = SPI_saveplan(SPI_prepare(query, 4, plan_types)); if (cs->plan_insert_log_1 == NULL) elog(ERROR, "Slony-I: SPI_prepare() failed"); sprintf(query, "INSERT INTO %s.sl_log_2 " ! "(log_origin, log_xid, log_tableid, log_actionseq," " log_cmdtype, log_cmddata) " ! "VALUES (%d, $1, $2, nextval('%s.sl_action_seq')," ! " $3, $4);", cs->clusterident, cs->localNodeId, cs->clusterident); ! plan_types[0] = xxid_typid; ! plan_types[1] = INT4OID; plan_types[2] = TEXTOID; - plan_types[3] = TEXTOID; ! cs->plan_insert_log_2 = SPI_saveplan(SPI_prepare(query, 4, plan_types)); if (cs->plan_insert_log_2 == NULL) elog(ERROR, "Slony-I: SPI_prepare() failed"); --- 1320,1350 ---- { /* * Create the saved plan's */ sprintf(query, "INSERT INTO %s.sl_log_1 " ! "(log_origin, log_txid, log_tableid, log_actionseq," " log_cmdtype, log_cmddata) " ! "VALUES (%d, \"pg_catalog\".txid_current(), $1, " ! "nextval('%s.sl_action_seq'), $2, $3); ", cs->clusterident, cs->localNodeId, cs->clusterident); ! plan_types[0] = INT4OID; ! plan_types[1] = TEXTOID; plan_types[2] = TEXTOID; ! cs->plan_insert_log_1 = SPI_saveplan(SPI_prepare(query, 3, plan_types)); if (cs->plan_insert_log_1 == NULL) elog(ERROR, "Slony-I: SPI_prepare() failed"); sprintf(query, "INSERT INTO %s.sl_log_2 " ! "(log_origin, log_txid, log_tableid, log_actionseq," " log_cmdtype, log_cmddata) " ! "VALUES (%d, \"pg_catalog\".txid_current(), $1, " ! "nextval('%s.sl_action_seq'), $2, $3); ", cs->clusterident, cs->localNodeId, cs->clusterident); ! plan_types[0] = INT4OID; ! plan_types[1] = TEXTOID; plan_types[2] = TEXTOID; ! cs->plan_insert_log_2 = SPI_saveplan(SPI_prepare(query, 3, plan_types)); if (cs->plan_insert_log_2 == NULL) elog(ERROR, "Slony-I: SPI_prepare() failed"); Index: slony1_base.sql =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_base.sql,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** slony1_base.sql 21 Aug 2007 22:15:44 -0000 1.37 --- slony1_base.sql 11 Dec 2007 19:30:29 -0000 1.38 *************** *** 58,62 **** set_id int4, set_origin int4, ! set_locked @NAMESPACE at .xxid, set_comment text, --- 58,62 ---- set_id int4, set_origin int4, ! set_locked bigint, set_comment text, *************** *** 82,88 **** ssy_origin int4, ssy_seqno int8, ! ssy_minxid @NAMESPACE at .xxid, ! ssy_maxxid @NAMESPACE at .xxid, ! ssy_xip text, ssy_action_list text, --- 82,86 ---- ssy_origin int4, ssy_seqno int8, ! ssy_snapshot "pg_catalog".txid_snapshot, ssy_action_list text, *************** *** 100,107 **** comment on column @NAMESPACE at .sl_setsync.ssy_origin is 'ID number of the node'; comment on column @NAMESPACE at .sl_setsync.ssy_seqno is 'Slony-I sequence number'; ! comment on column @NAMESPACE at .sl_setsync.ssy_minxid is 'Earliest XID in provider system affected by SYNC'; ! comment on column @NAMESPACE at .sl_setsync.ssy_maxxid is 'Latest XID in provider system affected by SYNC'; ! comment on column @NAMESPACE at .sl_setsync.ssy_xip is 'Contains the list of XIDs in progress at SYNC time'; ! comment on column @NAMESPACE at .sl_setsync.ssy_action_list is 'action list used during the subscription process. At the time a subscriber copies over data from the origin, it sees all tables in a state somewhere between two SYNC events. Therefore this list must contains all XIDs that are visible at that time, whose operations have therefore already been included in the data copied at the time the initial data copy is done. Those actions may therefore be filtered out of the first SYNC done after subscribing.'; --- 98,103 ---- comment on column @NAMESPACE at .sl_setsync.ssy_origin is 'ID number of the node'; comment on column @NAMESPACE at .sl_setsync.ssy_seqno is 'Slony-I sequence number'; ! comment on column @NAMESPACE at .sl_setsync.ssy_snapshot is 'TXID in provider system seen by the event'; ! comment on column @NAMESPACE at .sl_setsync.ssy_action_list is 'action list used during the subscription process. At the time a subscriber copies over data from the origin, it sees all tables in a state somewhere between two SYNC events. Therefore this list must contains all log_actionseqs that are visible at that time, whose operations have therefore already been included in the data copied at the time the initial data copy is done. Those actions may therefore be filtered out of the first SYNC done after subscribing.'; *************** *** 244,250 **** ev_seqno int8, ev_timestamp timestamp, ! ev_minxid @NAMESPACE at .xxid, ! ev_maxxid @NAMESPACE at .xxid, ! ev_xip text, ev_type text, ev_data1 text, --- 240,244 ---- ev_seqno int8, ev_timestamp timestamp, ! ev_snapshot "pg_catalog".txid_snapshot, ev_type text, ev_data1 text, *************** *** 264,271 **** comment on column @NAMESPACE at .sl_event.ev_seqno is 'The ID # for the event'; comment on column @NAMESPACE at .sl_event.ev_timestamp is 'When this event record was created'; ! comment on column @NAMESPACE at .sl_event.ev_minxid is 'Earliest XID on provider node for this event'; ! comment on column @NAMESPACE at .sl_event.ev_maxxid is 'Latest XID on provider node for this event'; comment on column @NAMESPACE at .sl_event.ev_seqno is 'The ID # for the event'; - comment on column @NAMESPACE at .sl_event.ev_xip is 'List of XIDs, in order, that are part of this event'; comment on column @NAMESPACE at .sl_event.ev_type is 'The type of event this record is for. SYNC = Synchronise --- 258,263 ---- comment on column @NAMESPACE at .sl_event.ev_seqno is 'The ID # for the event'; comment on column @NAMESPACE at .sl_event.ev_timestamp is 'When this event record was created'; ! comment on column @NAMESPACE at .sl_event.ev_snapshot is 'TXID snapshot on provider node for this event'; comment on column @NAMESPACE at .sl_event.ev_seqno is 'The ID # for the event'; comment on column @NAMESPACE at .sl_event.ev_type is 'The type of event this record is for. SYNC = Synchronise *************** *** 379,383 **** create table @NAMESPACE at .sl_log_1 ( log_origin int4, ! log_xid @NAMESPACE at .xxid, log_tableid int4, log_actionseq int8, --- 371,375 ---- create table @NAMESPACE at .sl_log_1 ( log_origin int4, ! log_txid bigint, log_tableid int4, log_actionseq int8, *************** *** 386,398 **** ) WITHOUT OIDS; create index sl_log_1_idx1 on @NAMESPACE at .sl_log_1 ! (log_origin, log_xid @NAMESPACE at .xxid_ops, log_actionseq); -- Add in an additional index as sometimes log_origin isn't a useful discriminant -- create index sl_log_1_idx2 on @NAMESPACE at .sl_log_1 ! -- (log_xid @NAMESPACE at .xxid_ops); comment on table @NAMESPACE at .sl_log_1 is 'Stores each change to be propagated to subscriber nodes'; comment on column @NAMESPACE at .sl_log_1.log_origin is 'Origin node from which the change came'; ! comment on column @NAMESPACE at .sl_log_1.log_xid is 'Transaction ID on the origin node'; comment on column @NAMESPACE at .sl_log_1.log_tableid is 'The table ID (from sl_table.tab_id) that this log entry is to affect'; comment on column @NAMESPACE at .sl_log_1.log_cmdtype is 'Replication action to take. U = Update, I = Insert, D = DELETE'; --- 378,390 ---- ) WITHOUT OIDS; create index sl_log_1_idx1 on @NAMESPACE at .sl_log_1 ! (log_origin, log_txid, log_actionseq); -- Add in an additional index as sometimes log_origin isn't a useful discriminant -- create index sl_log_1_idx2 on @NAMESPACE at .sl_log_1 ! -- (log_txid); comment on table @NAMESPACE at .sl_log_1 is 'Stores each change to be propagated to subscriber nodes'; comment on column @NAMESPACE at .sl_log_1.log_origin is 'Origin node from which the change came'; ! comment on column @NAMESPACE at .sl_log_1.log_txid is 'Transaction ID on the origin node'; comment on column @NAMESPACE at .sl_log_1.log_tableid is 'The table ID (from sl_table.tab_id) that this log entry is to affect'; comment on column @NAMESPACE at .sl_log_1.log_cmdtype is 'Replication action to take. U = Update, I = Insert, D = DELETE'; *************** *** 404,408 **** create table @NAMESPACE at .sl_log_2 ( log_origin int4, ! log_xid @NAMESPACE at .xxid, log_tableid int4, log_actionseq int8, --- 396,400 ---- create table @NAMESPACE at .sl_log_2 ( log_origin int4, ! log_txid bigint, log_tableid int4, log_actionseq int8, *************** *** 412,425 **** comment on table @NAMESPACE at .sl_log_2 is 'Stores each change to be propagated to subscriber nodes'; comment on column @NAMESPACE at .sl_log_2.log_origin is 'Origin node from which the change came'; ! comment on column @NAMESPACE at .sl_log_2.log_xid is 'Transaction ID on the origin node'; comment on column @NAMESPACE at .sl_log_2.log_tableid is 'The table ID (from sl_table.tab_id) that this log entry is to affect'; comment on column @NAMESPACE at .sl_log_2.log_cmdtype is 'Replication action to take. U = Update, I = Insert, D = DELETE'; comment on column @NAMESPACE at .sl_log_2.log_cmddata is 'The data needed to perform the log action'; create index sl_log_2_idx1 on @NAMESPACE at .sl_log_2 ! (log_origin, log_xid @NAMESPACE at .xxid_ops, log_actionseq); -- Add in an additional index as sometimes log_origin isn't a useful discriminant -- create index sl_log_2_idx2 on @NAMESPACE at .sl_log_2 ! -- (log_xid @NAMESPACE at .xxid_ops); --- 404,417 ---- comment on table @NAMESPACE at .sl_log_2 is 'Stores each change to be propagated to subscriber nodes'; comment on column @NAMESPACE at .sl_log_2.log_origin is 'Origin node from which the change came'; ! comment on column @NAMESPACE at .sl_log_2.log_txid is 'Transaction ID on the origin node'; comment on column @NAMESPACE at .sl_log_2.log_tableid is 'The table ID (from sl_table.tab_id) that this log entry is to affect'; comment on column @NAMESPACE at .sl_log_2.log_cmdtype is 'Replication action to take. U = Update, I = Insert, D = DELETE'; comment on column @NAMESPACE at .sl_log_2.log_cmddata is 'The data needed to perform the log action'; create index sl_log_2_idx1 on @NAMESPACE at .sl_log_2 ! (log_origin, log_txid, log_actionseq); -- Add in an additional index as sometimes log_origin isn't a useful discriminant -- create index sl_log_2_idx2 on @NAMESPACE at .sl_log_2 ! -- (log_txid); Index: slony1_funcs.sql =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -d -r1.124 -r1.125 *** slony1_funcs.sql 29 Nov 2007 21:29:03 -0000 1.124 --- slony1_funcs.sql 11 Dec 2007 19:30:29 -0000 1.125 *************** *** 1299,1307 **** insert into @NAMESPACE at .sl_event (ev_origin, ev_seqno, ev_timestamp, ! ev_minxid, ev_maxxid, ev_xip, ev_type, ev_data1, ev_data2, ev_data3) values (p_failed_node, p_ev_seqfake, CURRENT_TIMESTAMP, ! v_row.ev_minxid, v_row.ev_maxxid, v_row.ev_xip, ''FAILOVER_SET'', p_failed_node::text, p_backup_node::text, p_set_id::text); --- 1299,1307 ---- insert into @NAMESPACE at .sl_event (ev_origin, ev_seqno, ev_timestamp, ! ev_snapshot, ev_type, ev_data1, ev_data2, ev_data3) values (p_failed_node, p_ev_seqfake, CURRENT_TIMESTAMP, ! v_row.ev_snapshot, ''FAILOVER_SET'', p_failed_node::text, p_backup_node::text, p_set_id::text); *************** *** 1372,1380 **** insert into @NAMESPACE at .sl_event (ev_origin, ev_seqno, ev_timestamp, ! ev_minxid, ev_maxxid, ev_xip, ev_type, ev_data1, ev_data2, ev_data3, ev_data4) values (p_backup_node, "pg_catalog".nextval(''@NAMESPACE at .sl_event_seq''), CURRENT_TIMESTAMP, ! ''0'', ''0'', '''', ''ACCEPT_SET'', p_set_id::text, p_failed_node::text, p_backup_node::text, --- 1372,1380 ---- insert into @NAMESPACE at .sl_event (ev_origin, ev_seqno, ev_timestamp, ! ev_snapshot, ev_type, ev_data1, ev_data2, ev_data3, ev_data4) values (p_backup_node, "pg_catalog".nextval(''@NAMESPACE at .sl_event_seq''), CURRENT_TIMESTAMP, ! ''0'', ''0'', ''0:0:'', ''ACCEPT_SET'', p_set_id::text, p_failed_node::text, p_backup_node::text, *************** *** 1411,1417 **** insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_minxid, ssy_maxxid, ssy_xip, ssy_action_list) select p_set_id, p_backup_node, v_last_sync, ! ev_minxid, ev_maxxid, ev_xip, NULL from @NAMESPACE at .sl_event where ev_origin = p_backup_node --- 1411,1417 ---- insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_snapshot, ssy_action_list) select p_set_id, p_backup_node, v_last_sync, ! ev_snapshot, NULL from @NAMESPACE at .sl_event where ev_origin = p_backup_node *************** *** 1420,1426 **** insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_minxid, ssy_maxxid, ssy_xip, ssy_action_list) values (p_set_id, p_backup_node, ''0'', ! ''0'', ''0'', '''', NULL); end if; --- 1420,1426 ---- insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_snapshot, ssy_action_list) values (p_set_id, p_backup_node, ''0'', ! ''0'', ''0'', ''0:0:'', NULL); end if; *************** *** 1959,1963 **** -- ---- update @NAMESPACE at .sl_set ! set set_locked = @NAMESPACE at .getMaxXid() where set_id = p_set_id; --- 1959,1963 ---- -- ---- update @NAMESPACE at .sl_set ! set set_locked = "pg_catalog".txid_snapshot_xmax("public".txid_current_snapshot()) where set_id = p_set_id; *************** *** 2081,2085 **** raise exception ''Slony-I: set % is not locked'', p_set_id; end if; ! if v_set_row.set_locked > @NAMESPACE at .getMinXid() then raise exception ''Slony-I: cannot move set % yet, transactions < % are still in progress'', p_set_id, v_set_row.set_locked; --- 2081,2085 ---- raise exception ''Slony-I: set % is not locked'', p_set_id; end if; ! if v_set_row.set_locked > "pg_catalog".txid_snapshot_xmin("public".txid_current_snapshot()) then raise exception ''Slony-I: cannot move set % yet, transactions < % are still in progress'', p_set_id, v_set_row.set_locked; *************** *** 2235,2241 **** insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_minxid, ssy_maxxid, ssy_xip, ssy_action_list) select p_set_id, p_new_origin, v_last_sync, ! ev_minxid, ev_maxxid, ev_xip, NULL from @NAMESPACE at .sl_event where ev_origin = p_new_origin --- 2235,2241 ---- insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_snapshot, ssy_action_list) select p_set_id, p_new_origin, v_last_sync, ! ev_snapshot, NULL from @NAMESPACE at .sl_event where ev_origin = p_new_origin *************** *** 2244,2250 **** insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_minxid, ssy_maxxid, ssy_xip, ssy_action_list) values (p_set_id, p_new_origin, ''0'', ! ''0'', ''0'', '''', NULL); end if; end if; --- 2244,2250 ---- insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_snapshot, ssy_action_list) values (p_set_id, p_new_origin, ''0'', ! ''0'', ''0'', ''0:0:'', NULL); end if; end if; *************** *** 2279,2285 **** insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_minxid, ssy_maxxid, ssy_xip, ssy_action_list) select p_set_id, p_new_origin, v_last_sync, ! ev_minxid, ev_maxxid, ev_xip, NULL from @NAMESPACE at .sl_event where ev_origin = p_new_origin --- 2279,2285 ---- insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_snapshot, ssy_action_list) select p_set_id, p_new_origin, v_last_sync, ! ev_snapshot, NULL from @NAMESPACE at .sl_event where ev_origin = p_new_origin *************** *** 2288,2294 **** insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_minxid, ssy_maxxid, ssy_xip, ssy_action_list) values (p_set_id, p_new_origin, ''0'', ! ''0'', ''0'', '''', NULL); end if; end if; --- 2288,2294 ---- insert into @NAMESPACE at .sl_setsync (ssy_setid, ssy_origin, ssy_seqno, ! ssy_snapshot, ssy_action_list) values (p_set_id, p_new_origin, ''0'', ! ''0'', ''0'', ''0:0:'', NULL); end if; end if; *************** *** 5203,5207 **** if not found then -- raise notice ''index was not found - add it!''; ! v_iname := ''PartInd_ at CLUSTERNAME@_sl_log_'' || v_log || ''-node-'' || v_dummy.set_origin; v_ilen := pg_catalog.length(v_iname); v_maxlen := pg_catalog.current_setting(''max_identifier_length''::text)::int4; --- 5203,5207 ---- if not found then -- raise notice ''index was not found - add it!''; ! v_iname := ''PartInd_ at CLUSTERNAME@_sl_log_'' || v_log || ''-node-'' || v_dummy.set_origin; v_ilen := pg_catalog.length(v_iname); v_maxlen := pg_catalog.current_setting(''max_identifier_length''::text)::int4; *************** *** 5211,5215 **** idef := ''create index "'' || v_iname || ! ''" on @NAMESPACE at .sl_log_'' || v_log || '' USING btree(log_xid @NAMESPACE at .xxid_ops) where (log_origin = '' || v_dummy.set_origin || '');''; execute idef; v_count := v_count + 1; --- 5211,5215 ---- idef := ''create index "'' || v_iname || ! ''" on @NAMESPACE at .sl_log_'' || v_log || '' USING btree(log_txid) where (log_origin = '' || v_dummy.set_origin || '');''; execute idef; v_count := v_count + 1; *************** *** 5340,5345 **** end if; - -- In any version, make sure that the xxidin() functions are defined as STRICT - perform @NAMESPACE at .make_function_strict (''xxidin'', ''(cstring)''); return p_old; end; --- 5340,5343 ----
- Previous message: [Slony1-commit] slony1-engine/src/slon remote_listen.c remote_worker.c
- Next message: [Slony1-commit] slony1-engine/src/slonik slonik.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list