Hi, If a certain table has different schemas and the subscriber table has an unmatched column with a not null constraint, the logical replication crashes with the above stack trace.
-- publisher CREATE TABLE test (a integer, b varchar not null, c numeric not null, PRIMARY KEY(a)); -- subscriber CREATE TABLE test (a integer, b varchar not null, c numeric not null, d integer not null, PRIMARY KEY(a)); Program terminated with signal SIGSEGV, Segmentation fault. #0 list_nth_cell (n=0, list=0x0) at list.c:411 411 { (gdb) bt #0 list_nth_cell (n=0, list=0x0) at list.c:411 #1 list_nth (list=0x0, n=0) at list.c:413 #2 0x00000000005ddc6b in ExecConstraints (resultRelInfo=resultRelInfo@entry=0xf96868, slot=slot@entry=0xf984d8, estate=estate@entry=0xfc3808) at execMain.c:1881 #3 0x000000000057b0ba in CopyFrom (cstate=0xf980c8) at copy.c:2652 #4 0x00000000006ae3bb in copy_table (rel=<optimized out>) at tablesync.c:682 #5 LogicalRepSyncTableStart (origin_startpos=0x7ffe9c340640) at tablesync.c:789 #6 0x00000000006afb0f in ApplyWorkerMain (main_arg=<optimized out>) at worker.c:1521 #7 0x0000000000684813 in StartBackgroundWorker () at bgworker.c:838 #8 0x000000000068f6a2 in do_start_bgworker (rw=0xf0cbb0) at postmaster.c:5577 #9 maybe_start_bgworker () at postmaster.c:5761 #10 0x0000000000690195 in sigusr1_handler (postgres_signal_arg=<optimized out>) at postmaster.c:5015 #11 <signal handler called> #12 0x00007fcd075f6873 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81 #13 0x0000000000476c0c in ServerLoop () at postmaster.c:1693 #14 0x0000000000691342 in PostmasterMain (argc=argc@entry=1, argv=argv@entry=0xee4eb0) at postmaster.c:1337 #15 0x0000000000478684 in main (argc=1, argv=0xee4eb0) at main.c:228 Are we prepared to support different schemas in v10? Or should we disallow it for v10 and add a TODO? -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento <http://www.timbira.com.br>