Dear Shveta,
While investigating more, I found that the launcher crashes while executing the
script. Please see attached one.
In this script, the subscriber was also the publisher. Both subscriber and
subscriber2 referred the same replication slot, which was synchronized by slotsync
worker. I was quite not sure the synchronization should be occurred in this case,
but at lease core must not be dumped. The secondary server crashed.
primary ---> secondary
| |
subscriber subscriber2
I checked the stack trace and found that the apply worker crashed.
```
(gdb) bt
#0 0x0000000000b310a9 in check_for_freed_segments (area=0x3a4ec68) at ../postgres/src/backend/utils/mmgr/dsa.c:2248
#1 0x0000000000b2e856 in dsa_get_address (area=0x3a4ec68, dp=16384) at ../postgres/src/backend/utils/mmgr/dsa.c:959
#2 0x00000000008a2bb5 in slotsync_remove_obsolete_dbs (remote_dbs=0x1fcea70)
at ../postgres/src/backend/replication/logical/launcher.c:1615
#3 0x00000000008a318d in ApplyLauncherStartSlotSync (wait_time=0x7ffe15cd57a8, wrconn=0x1f82ec0)
at ../postgres/src/backend/replication/logical/launcher.c:1799
#4 0x00000000008a3667 in ApplyLauncherMain (main_arg=0) at
../postgres/src/backend/replication/logical/launcher.c:1967
#5 0x0000000000863aef in StartBackgroundWorker () at ../postgres/src/backend/postmaster/bgworker.c:867
#6 0x000000000086e260 in do_start_bgworker (rw=0x1f6b4e0) at ../postgres/src/backend/postmaster/postmaster.c:5740
#7 0x000000000086e649 in maybe_start_bgworkers () at ../postgres/src/backend/postmaster/postmaster.c:5964
#8 0x000000000086953d in ServerLoop () at ../postgres/src/backend/postmaster/postmaster.c:1852
#9 0x0000000000868c42 in PostmasterMain (argc=3, argv=0x1f3e240) at
../postgres/src/backend/postmaster/postmaster.c:1465
#10 0x000000000075ad5f in main (argc=3, argv=0x1f3e240) at ../postgres/src/backend/main/main.c:198
```
Best Regards,
Hayato Kuroda
FUJITSU LIMITED