Hi. While verifying the logical replication of PostgreSQL 10-devel, I found the following problem.
* When you run the SUBSCRIPTION command against a table in the same PostgreSQL server, hang up. * Canceling the hung SUBSCRIPTION command with CTRL + C causes a server process occurs Segfault, and the PostgreSQL server to restart. -------- [Steps to Reproduce] $ createdb db1 -U postgres $ createdb db2 -U postgres $ psql -U postgres db1 -c "CREATE TABLE test (id int primary key, data text)" $ psql -U postgres db2 -c "CREATE TABLE test (id int primary key, data text)" $ psql -U postgres db1 -c "CREATE PUBLICATION pub_db1_test FOR TABLE test" $ psql -U postgres db2 -c "CREATE SUBSCRIPTION sub_db2_test CONNECTION 'dbname=db1 port=5432 user=postgres' PUBLICATION pub_db1_test" The SUBSCRIPTION command does not end, it hangs up. At this time, the following logs are output in the server log. 2017-02-21 06:58:05.082 JST [22060] LOG: logical decoding found initial starting point at 0/1C06660 2017-02-21 06:58:05.082 JST [22060] DETAIL: 1 transaction needs to finish. Suspending psql (running SUBSCRIPTION) with CTRL + C causes a Segfault in the server process. At this time, the following message is output to the server log. 2017-02-21 07:01:00.246 JST [22059] ERROR: canceling statement due to user request 2017-02-21 07:01:00.246 JST [22059] STATEMENT: CREATE SUBSCRIPTION sub_db2_test CONNECTION 'dbname=db1 port=5432 user=postgres' PUBLICATION pub_db1_test 2017-02-21 07:01:01.006 JST [21445] LOG: server process (PID 22060) was terminated by signal 11: Segmentation fault 2017-02-21 07:01:01.007 JST [21445] LOG: terminating any other active server processes -------- [Environment] postgres=# SELECT version(); version ------------------------------------------------------------------------------------------------------------ PostgreSQL 10devel on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16), 64-bit (1 row) postgres=# SHOW wal_level; wal_level ----------- logical (1 row) postgres=# SHOW max_wal_senders;; max_wal_senders ----------------- 10 (1 row) postgres=# SHOW max_replication_slots; max_replication_slots ----------------------- 10 (1 row) postgres=# TABLE pg_hba_file_rules ; line_number | type | database | user_name | address | netmask | auth_method | options | error -------------+-------+---------------+------------+-----------+-----------------------------------------+-------------+---------+------- 2 | local | {all} | {all} | | | trust | | 4 | host | {all} | {all} | 127.0.0.1 | 255.255.255.255 | trust | | 6 | host | {all} | {all} | ::1 | ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | trust | | 9 | local | {replication} | {postgres} | | | trust | | (4 rows) Regards.