replication issue: null value in column "id" violates not-null constraint
See original GitHub issueJul 18 08:13:44: [ERROR] - global_lib.py (413): An error occurred during the replica. (<class 'psycopg2.IntegrityError'>, IntegrityError('null value in column "id" violates not-null constraint
DETAIL: Failing row contains (null, null, null, null, null, 2, null, null, b:1:144,b:2:144, null, null, null, null, null, null, null, 0, 0, 0, null).
CONTEXT: SQL statement "
UPDATE switchv2.rate
SET
day=NULL,
data=NULL,
tier0='b:1:144,b:2:144',
tier1=NULL,
tier2=NULL,
tier3=NULL,
tier4=NULL,
tier5=NULL,
tier6=NULL,
tier7=NULL,
max_los=NULL,
min_los='2',
id=NULL,
tier_active='0',
max_los_thru=NULL,
min_los_thru=NULL,
rateplan_code=NULL,
number_of_units=NULL,
close_to_arrival='0',
close_to_departure='0'
WHERE ("id","rateplan_code","day")=('S000186','ST_BAR4','2017-08-25');
"
PL/pgSQL function sch_chameleon.fn_process_batch(integer,integer) line 216 at EXECUTE
',), <traceback object at 0x7f99ac2c5148>)
Mysql does do this correctly in the replication (I am replicating of a slave), but I do not know the exact sql statement right now that would trigger this.
I guess it is a rowlevel entry that fails.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Postgres error: null value in column "id" - during insert ...
Since you don't explicitly set it, it's implicitly given a null value, which is, of course, not a valid value for a primary...
Read more >null value in column violates not-null constraint" for an ...
I have an AWS Database Migration Service (AWS DMS) task that is both full load and change data capture (CDC). I received an...
Read more >ERROR: null value in column "id" violates not-null constraint
The workaround is to replicate long strings of fragile code, violating DRY. My situation is that 22 fields (the maximum supported) must be ......
Read more >null value in column "project_id" violates not-null constraint ...
It's very hard to reproduce the issue. A working way is: to create the project manually leaving defaults, then; to use GitLabracadabra to...
Read more >ERROR: null value in column "payload" violates not...
ERROR : null value in column "payload" violates not-null constraint QlikSensePrintingWebSocketProxy in Windows Event Logs.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
with binlog_row_image=FULL on the mysql slave acting as master now everything seems to work fine.
as soon as the issue is confirmed fix I shall close it