Bug 255 - SSI issues with 9.1
Summary: SSI issues with 9.1
Status: RESOLVED FIXED
Alias: None
Product: Slony-I
Classification: Unclassified
Component: slon (show other bugs)
Version: 2.0
Hardware: PC Linux
: low enhancement
Assignee: Slony Bugs List
URL:
Depends on:
Blocks:
 
Reported: 2011-12-13 08:42 UTC by Steve Singer
Modified: 2011-12-13 08:56 UTC (History)
1 user (show)

See Also:


Attachments
Proposed fix (6.19 KB, patch)
2011-12-13 08:47 UTC, Steve Singer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Singer 2011-12-13 08:42:04 UTC
As reported on the mailing list
http://lists.slony.info/pipermail/slony1-general/2011-November/011939.htmllony 2.0.7 replication just stalled on big update on master (like
300.000 in batch.. nothing crazy).

Slony log on slave show repeatable (like each 5 minute) error:

2011-11-18 08:46:03 MSKERROR  remoteWorkerThread_4: "insert into
"_sports".sl_event     (ev_origin, ev_seqno, ev_timestamp,
ev_snapshot, ev_type     ) values ('4', '5000054127', '2011-11-18
06:18:44.863299', '922722:922722:', 'SYNC'); insert into
"_sports".sl_confirm     (con_origin, con_received, con_seqno,
con_timestamp)    values (4, 3, '5000054127', now()); insert into
"_sports".sl_event     (ev_origin, ev_seqno, ev_timestamp,
ev_snapshot, ev_type     ) values ('4', '5000054128', '2011-11-18
06:18:45.890297', '922731:922731:', 'SYNC'); insert into
"_sports".sl_confirm   (con_origin, con_received, con_seqno,
con_timestamp)    values (4, 3, '5000054128', now()); insert into
"_sports".sl_event     (ev_origin, ev_seqno, ev_timestamp,
ev_snapshot, ev_type     ) values ('4', '5000054129', '2011-11-18
06:18:46.921278', '922736:922736:', 'SYNC'); insert into
"_sports".sl_confirm      (con_origin, con_received, con_seqno,
con_timestamp)    values (4, 3, '5000054129', now()); commit
transaction;"
PGRES_FATAL_ERROR ERROR:  could not serialize access due to read/write
dependencies among transactions
DETAIL:  Reason code: Canceled on identification as a pivot, during write.
HINT:  The transaction might succeed if retried.
In that case slony just terminate without commiting batch (and
returned to the life only by watchdog).
Comment 1 Steve Singer 2011-12-13 08:47:56 UTC
Created attachment 138 [details]
Proposed fix

9.1 to avoid pivot conflicts.

specify SERIALIZABLE for read only deferred transactions.
Make remote_worker calls to the provider read-only deferred
Make remote_worker calls on the local con READ COMMITTED.
Make the remote listener run in a READ ONLY DEFERRED transaction on

Based on a patch by Simon Riggs.