[Bucardo-general] 5.6 changes

Jeff Ross rossj at cargotel.com
Sat May 23 14:37:20 UTC 2020


On 2020-05-22 18:37, David Christensen wrote:
>> On May 22, 2020, at 5:08 PM, Jeff Ross <rossj at cargotel.com> wrote:
>>
>> Hi all,
>>
>> We're getting a lot of errors in syncs after upgrading to 5.6 in a master <--> master setup.  The left master is the dominant side, supposedly the right side is not yet trying to insert/update back to the left side.
> Do you happen to have a record of how you upgraded this cluster?  Just installing, then `bucardo upgrade`?
>

I did the upgrade several months ago--not long after 5.6 was released 
and I do not remember if I did a bucardo upgrade or not. If I didn't 
what exactly does the upgrade option do and can I still run it?
>>  From the logs it almost appears that we are getting both of these:
>>
>>      a)  inserts/updates from left are applied to right, then right tries to re-apply them back to left.  This results in a pkey_conflict on the left side.
> It kind of sounds like the data is being copied with the wrong session_replication_role, meaning that the delta rows are being captured as if you were in srr “origin" mode, instead of “replica”.  Can you look if there are any errors in the postgres logs related to “session_replication_role”?

No mention of session_replication_role on the left master in either the 
postgres logs or the bucardo logs.  Assuming that this also means that 
session_replication_role is not being used, how would I fix that?

>
> Can we verify the “bucardo” user is being used to connect, and that it is set to superuser on all nodes in the cluster?

I verfied that bucardo is a superuser on both sides and the logs do show 
bucardo is being used to connect.
>
> Are nodes involved self-hosted, or something else like RDS?

Self hosted, although the right side is an EC2 instance.
>
>>      b)  sequences now appear to be replicated?  This is a long shot but before upgrading to 5.6 I had set left side sequences to increment by 2, starting with odd and right side sequences to increment by 2 stating with even.  Now. left side gives even numbers for nextval(seq) and it should not.  I've tried to reset this multiple times with no success--but it *had* been working prior to upgrade to 5.6.
> Sequences *can* be replicated, but only if you explicitly ask for it; it shouldn’t be coming as part of the normal upgrade.  If you are using a multi-master setup, you definitely should *not* be replicating sequences as a matter of course.  If it *did* get sync’d though, this would be the behavior I’d expect though, since the current value would get set, leaving the increment the same.
>
Maybe I misunderstood this thread:

https://bucardo.org/pipermail/bucardo-general/2020-January/003168.html

I think I'd better just remove the sequences from the sync--I didn't 
think it mattered since they were not at that time being synced.

Thank you David!

Jeff


-- 
The contents of this e-mail and any attachments are intended solely for the 
use of the named addressee(s) and may contain confidential and/or 
privileged information. Any unauthorized use, copying, disclosure, or 
distribution of the contents of this e-mail is strictly prohibited by the 
sender and may be unlawful. If you are not the intended recipient, please 
notify the sender immediately and delete this e-mail.


More information about the Bucardo-general mailing list