[Bucardo-general] Inserts when deleting question
Gabriel Weinberg
yegg at alum.mit.edu
Sat May 14 22:09:54 UTC 2011
Hi, I had written in on May 3 with a question about inserts appearing in the
sync status output when deleting. I made a test case to make the question
more clear.
createdb testa
createdb testb
create table test (id integer primary key);
bucardo_ctl add database testa name=testa
bucardo_ctl add database testb name=testb
bucardo_ctl add table test db=testa
bucardo_ctl add herd test_herd test
bucardo_ctl add sync test_sync source=test_herd targetdb=testb status=active
type=pushdelta
testa=# insert into test (id) values (1);
INSERT 0 1
This results what I would expect:
Ins/Upd/Del: 1 / 0 / 0
And of course the row is copied:
testb=# select * from test;
id
----
1
(1 row)
Then I do
testa=# delete from test;
DELETE 1
But then sync output shows 1 insert with the delete, which is what I was not
expecting:
Ins/Upd/Del: 1 / 0 / 1
Here's the full status output:
Days back: 3 User: bucardo Database: bucardo
======================================================================
Sync name: test_sync
Current state: idle (PID = 89983)
Type: pushdelta
Source herd/database: test_herd / testa
Target database: testb
Tables in sync: 1
Last good: 3s (time to run: 0s)
Last good time: May 14, 2011 18:04:59 Target: testb
Ins/Upd/Del: 1 / 0 / 1
Last bad: unknown
PID file: /var/run/bucardo/bucardo.ctl.sync.test_sync.pid
PID file created: Sat May 14 18:03:59 2011
Status: active
Limitdbs: 0
Priority: 0
Checktime: none
Overdue time: 00:00:00
Expired time: 00:00:00
Stayalive: yes Kidsalive: yes
Rebuild index: 0 Do_listen: no
Ping: yes Makedelta: no
Onetimecopy: 0
Why is that?
When I extrapolate to deleting a lot of rows it results in a lot of inserts.
And I see it copying those inserts in as well so it is not just stray
output.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20110514/8cf17fc7/attachment.html
More information about the Bucardo-general
mailing list