2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.01k stars 153 forks source link

Segmentation fault when trying to replicate data #314

Open madankumark opened 3 years ago

madankumark commented 3 years ago

I'm facing a segmentation fault when trying to replicate the data and it's continuously causing the PostgreSQL service to restart. The initialization phase went fine and hitting the error during the replicating phase.

2021-05-10 05:38:21 UTC::@:[2282]: LOG: background worker "pglogical apply 52110354:570962061" (PID 2595) was terminated by signal 11: Segmentation fault

Source: PostgreSQL 12.6 (Ubuntu 12.6-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit pglogical | 2.3.3 | 2.3.3 | PostgreSQL Logical Replication

Target: PostgreSQL 12.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit pglogical | 2.3.3 | 2.3.3 | PostgreSQL Logical Replication

Below is the stack trace from the core dump file.

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/pgsql-12/bin/postgres...Reading symbols from /usr/pgsql-12/bin/postgres...(no debugging symbols found)...done. (no debugging symbols found)...done. [New LWP 2595] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `postgres: prod: pglogical apply 52110354:570962061 '. Program terminated with signal 11, Segmentation fault.

0 0x000000000060f1c0 in CheckVarSlotCompatibility.isra.2 ()

Missing separate debuginfos, use: debuginfo-install postgresql12-server-12.6-1PGDG.rhel7.x86_64 (gdb) backtrace

0 0x000000000060f1c0 in CheckVarSlotCompatibility.isra.2 ()

1 0x000000000060f769 in CheckExprStillValid ()

2 0x000000000060f782 in ExecInterpExprStillValid ()

3 0x00007fc0b0096996 in fill_missing_defaults () from /usr/pgsql-12/lib/pglogical.so

4 0x00007fc0b009721b in pglogical_apply_heap_update () from /usr/pgsql-12/lib/pglogical.so

5 0x00007fc0b008072c in handle_update () from /usr/pgsql-12/lib/pglogical.so

6 0x00007fc0b0082198 in apply_work () from /usr/pgsql-12/lib/pglogical.so

7 0x00007fc0b0082e49 in pglogical_apply_main () from /usr/pgsql-12/lib/pglogical.so

8 0x00000000006e45af in StartBackgroundWorker ()

9 0x00000000006f0903 in maybe_start_bgworkers ()

10 0x00000000006f14e5 in sigusr1_handler ()

11

12 0x00007fc0bd28fa13 in __select_nocancel () from /lib64/libc.so.6

13 0x0000000000483b0b in ServerLoop ()

14 0x00000000006f2773 in PostmasterMain ()

15 0x0000000000485333 in main ()

peipeiyin commented 2 years ago

Are the columns of the table the same between the publisher and subscriber?