Re: Errors with schema migration and logical replication — expected? - Mailing list pgsql-general

From Mike Lissner
Subject Re: Errors with schema migration and logical replication — expected?
Date
Msg-id CAMp9=Eypj1cNtnoW8ahFV25mwx8LjTn1x2quPUE-H6tE+D_9pA@mail.gmail.com
Whole thread Raw
In response to Re: Errors with schema migration and logical replication — expected?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Errors with schema migration and logical replication — expected?
List pgsql-general

The above seems to be the crux of the problem, how did NULL get into the
column data?


I agree. My queries are generated by Django (so I never write SQL myself), but:

 - the column has always been NOT NULL for its entire lifetime
 - we don't send *any* SQL commands to the replica yet, so that's not a factor (for now it's just a live backup)
 - the publisher now has a NOT NULL constraint on that column. I never had to clear out null values to put it in place. I assume that if that column ever had a null value and I tried to run a DDL to add a null constraint, the DDL would have failed, right?

Something feels wrong here, the more I think about it.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Errors with schema migration and logical replication — expected?
Next
From: Adrian Klaver
Date:
Subject: Re: Errors with schema migration and logical replication — expected?