PG Bug reporting form <noreply@postgresql.org> writes:
> When logical replication target is a partitioned table then execution of any
> DDL on source table leads to crash of target (subscriber) server.
Thanks for the report! I duplicated the crash on v13 branch tip,
although it's hitting an assertion failure before reaching any segfault:
#2 0x00000000008f466a in ExceptionalCondition (
conditionName=conditionName@entry=0xa5eae0 "natts == rel->attrmap->maplen", errorType=errorType@entry=0x948cc9
"FailedAssertion",
fileName=fileName@entry=0xa52956 "worker.c",
lineNumber=lineNumber@entry=490) at assert.c:67
#3 0x0000000000777741 in slot_modify_cstrings (slot=slot@entry=0x2ec6e40,
srcslot=<optimized out>, rel=rel@entry=0x2eca918,
values=values@entry=0x7fffb3506480, replaces=replaces@entry=0x7fffb3509880)
at worker.c:490
#4 0x00000000007785e7 in apply_handle_tuple_routing (
edata=edata@entry=0x2ea45a0, remoteslot=remoteslot@entry=0x2ea48a0,
newtup=newtup@entry=0x7fffb3506480, operation=operation@entry=CMD_UPDATE)
at worker.c:1153
#5 0x0000000000778e74 in apply_handle_update (s=s@entry=0x7fffb3509fa0)
at worker.c:846
#6 0x000000000077963c in apply_dispatch (s=0x7fffb3509fa0) at worker.c:1415
#7 LogicalRepApplyLoop (last_received=254887792) at worker.c:1624
#8 ApplyWorkerMain (main_arg=<optimized out>) at worker.c:2171
#9 0x0000000000743ec9 in StartBackgroundWorker () at bgworker.c:890
Interestingly, the same test case does NOT crash for me on master.
So apparently we fixed something that should have been back-patched.
regards, tom lane