开发者

postgres slony-i master node tables can't be written after running for few days

I set up slony to replicate 3 tables from one opensuse pc (master node) to another opensuse pc (slave node). It works well at first. After running for few days, it suddenly come out the error message of -

ERROR: Slony-I: Table euprofiles is replicated and cannot be modified on a subscriber node - role=0

eu开发者_StackOverflow社区profiles is one of the tables being replicated by slony.

I know that this message may occur if you are trying to write to the table of slave node. But here I am writing to master node only.

Does anyone see similar problem?


Never had this happen. Are you certain you're connecting to the db you think you're connecting to? Slony may be a bit difficult to setup and such, but it doesn't just randomly decide a master is now a slave.

If you psql into the two databasesand do \d euprofiles on each what do they say? The source table should have something like this at the end:

Triggers: _slony_www_logtrigger_228 AFTER INSERT OR DELETE OR UPDATE ON users FOR EACH ROW EXECUTE PROCEDURE _slony_www.logtrigger('_slony_www', '228', 'kvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv')

and the destination table should have something like this:

Triggers: _slony_www_denyaccess_228 BEFORE INSERT OR DELETE OR UPDATE ON users FOR EACH ROW EXECUTE PROCEDURE _slony_www.denyaccess('_slony_www')

If they both look like this last trigger there's some problem. But I'm betting you're just connecting to the wrong server. Let's hope it's that simple.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜