> Well, I was able to fix this by briefly allowing nulls on the > subscriber, letting it catch up with the publisher, setting all > nulls to empty strings (a Django convention), and then disallowing > nulls again. After letting it catch up, there were 118 nulls on the > subscriber in this column:
So recap_sequence_number is not actually a number, it is a code?
It has sequential values, but they're not necessarily numbers.
> > I appreciate all the responses. I'm scared to say so, but I think > this is a bug in logical replication. Somehow a null value appeared > at the subscriber that was never in the publisher. > > I also still have this question/suggestion from my first email: > > > Is the process for schema migrations documented somewhere beyond > the above?
Not that I know of. It might help, if possible, to detail the steps in the migration. Also what program you used to do it. Given that is Django I am assuming some combination of migrate, makemigrations and/or sqlmigrate.
Pretty simple/standard, I think:
- Changed the code.
- Generated the migration using manage.py makemigration
- Generated the SQL using sqlmigrate
- Ran the migration using manage.py migrate on the master and using psql on the replica