Re: error “server process was terminated by signal 11: Segmentation fault” running pg_create_logical_replication_slot using pgoutput plugin - Mailing list pgsql-general

From abrahim abrahao
Subject Re: error “server process was terminated by signal 11: Segmentation fault” running pg_create_logical_replication_slot using pgoutput plugin
Date
Msg-id 714296734.237495.1752168801905@mail.yahoo.com
Whole thread Raw
In response to RE: error “server process was terminated by signal 11: Segmentation fault” running pg_create_logical_replication_slot using pgoutput plugin  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
List pgsql-general
Thanks  Hayato and Shlok, 
The Citus extension package is installed, but it is not preload on shared_preload_libraries and citus extesion is not created.
I will create a new container without Citus extension package and adding stack trace ( I think this is the one you're talking about) as soon as possible and I will update here as soon I complete the test.

See information below.

show shared_preload_libraries;
   shared_preload_libraries
-------------------------------
 pg_stat_statements, pg_repack
(1 row)

\dx
                                            List of installed extensions
        Name        | Version |   Schema   |                              Description
--------------------+---------+------------+------------------------------------------------------------------------
 btree_gist         | 1.7     | public     | support for indexing common datatypes in GiST
 ltree              | 1.2     | public     | data type for hierarchical tree-like structures
 pg_stat_statements | 1.10    | public     | track planning and execution statistics of all SQL statements executed
 pg_trgm            | 1.5     | public     | text similarity measurement and index searching based on trigrams
 pgcrypto           | 1.3     | public     | cryptographic functions
 plpgsql            | 1.0     | pg_catalog | PL/pgSQL procedural language
 postgis            | 3.5.1   | public     | PostGIS geometry and geography spatial types and functions
 uuid-ossp          | 1.1     | public     | generate universally unique identifiers (UUIDs)
(8 rows)


Steps done until pg_create_logical_replication_slot command (just the steps, does not include the full command)

set wal_level, max_replication_slots, max_wal_senders and listen_addresses
         name          | setting
-----------------------+---------
 listen_addresses      | *
 max_replication_slots | 10
 max_wal_senders       | 20
 wal_level             | logical

Changed pg_hba file
restart database
pg_ctl restart -D $POSTGRESQL_DATA
create a user "CREATE USER user_rep WITH REPLICATION ENCRYPTED PASSWORD"
ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA myg GRANT SELECT ON TABLES TO user_rep;
CREATE PUBLICATION myg_pub FOR TABLES IN SCHEMA myg;
ALTER PUBLICATION myg_pub ADD TABLE myg
SELECT snapshot_name FROM pg_create_logical_replication_slot

On Wednesday, July 9, 2025 at 10:19:07 p.m. EDT, Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> wrote:


Dear Shlok, Abrahim,

> Also, I was going to the logs on found:
> > > < 2025-07-08 14:57:08.653 UTC psql postgres postgres 172.18.0.94(53414)
> SELECT 00000 2025-07-08 14:57:07 UTC 1096 686d31c3.448 2025-07-08
> 14:57:08.653 UTC > LOG:  Initializing CDC decoder
>
> This log is not present in Postgres source code. Why is this log appearing here?

I found the output in Citus source code [1]. So, I'm afraid that you may load the
shared library provided by Citus when you created the replication slot.

If so, Citus community may be the better place to discuss the bug.
We can help if you can reproduce the bug by the PostgreSQL core codes.


[1]:
https://github.com/citusdata/citus/blob/5deaf9a61673e10c183b6d4f13593f168e1c2c10/src/backend/distributed/cdc/cdc_decoder.c#L85

Best regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Aggregate versions of hashing functions (md5, sha1, etc...)
Next
From: Dimitrios Apostolou
Date:
Subject: having temp_tablespaces on less reliable storage