pg_duckdb icon indicating copy to clipboard operation
pg_duckdb copied to clipboard

Running a simple query with the timescaledb and pg_duckdb extensions installed causes the server to crash: Segmentation fault.

Open rusha1333 opened this issue 2 months ago • 1 comments

What happens?

While executing the query select count() from our_table with SET duckdb.force_execution = true, the server crashed and reported that the server process (PID 2250149) terminated with signal 11: Segmentation fault. The crashing process was executing: select count() from our_table;

To Reproduce

psql mydb psql (17.6 (Ubuntu 17.6-2.pgdg24.04+1))

mydb=# \dx List of installed extensions Name | Version | Schema | Description
--------------------+---------+------------+--------------------------------------------------------------------------------------- pg_duckdb | 1.1.0 | public | DuckDB Embedded in Postgres pg_stat_statements | 1.11 | public | track planning and execution statistics of all SQL statements executed pg_trgm | 1.6 | myschema | text similarity measurement and index searching based on trigrams plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language timescaledb | 2.22.1 | myschema | Enables scalable inserts and complex queries for time-series data (Community Edition)

\d+ our_table Table "our_table" Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description -----------------+--------------------------+-----------+----------+---------+----------+-------------+--------------+------------- ap_id | bigint | | not null | | plain | | | code | character varying(11) | | not null | | extended | | | value | text | | | | extended | | | valid_from | timestamp with time zone | | not null | | plain | | | valid_to | timestamp with time zone | | not null | | plain | | | created_at | timestamp with time zone | | not null | | plain | | | modified_at | timestamp with time zone | | | | plain | | | process_type_id | smallint | | | | plain | | | process_id | bigint | | | | plain | | | Indexes: "our_table_pkey" PRIMARY KEY, btree (ap_id, code, valid_from) "our_table_2__code" btree (code) "our_table_2__valid_to" btree (valid_to) "our_table_2__value" btree (value) Access method: heap

mydb=# SET duckdb.force_execution = true; SET mydb=# select count(*) from our_table; server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. The connection to the server was lost. Attempting reset: Failed.

server log: 2025-10-24 11:52:30.474 EEST [1551080] [24] db=,user=,app=,client= LOG: server process (PID 2250149) was terminated by signal 11: Segmentation fault 2025-10-24 11:52:30.474 EEST [1551080] [25] db=,user=,app=,client= DETAIL: Failed process was running: select count(*) from our_table;db

OS:

Ubuntu 24.04.3 LTS

pg_duckdb Version (if built from source use commit hash):

fad000f pg_duckdb v1.0.0

Postgres Version (if built from source use commit hash):

17.6 (Ubuntu 17.6-2.pgdg24.04+1))

Hardware:

No response

Full Name:

Alexander Prikhno

Affiliation:

UKRENERGO CIFROVI RISHENNYA

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • [x] Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • [x] Yes, I have

rusha1333 avatar Oct 24 '25 09:10 rusha1333

same problem with timescaledb

h0rn3t avatar Oct 28 '25 14:10 h0rn3t

Can you share a stack trace of the crash?

JelteF avatar Dec 03 '25 11:12 JelteF

Here is output of debugging query using GDB

first run to find out source code:

gdb -p 1662552 (gdb) continue Continuing. [New Thread 0x7f6b61a416c0 (LWP 1662660)] [New Thread 0x7f6b612406c0 (LWP 1662661)] [New Thread 0x7f6b60a3f6c0 (LWP 1662662)]

Thread 4 "postgres" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f6b60a3f6c0 (LWP 1662662)] BaserelInfo_insert_hash_internal (tb=0x0, key=key@entry=31621235, hash=636350238, hash@entry=3020186918, found=found@entry=0x7f6b60a3dc77) at /usr/include/postgresql/17/server/lib/simplehash.h:627 627 if (unlikely(tb->members >= tb->grow_threshold)) (gdb) continue Continuing. [Thread 0x7f6b60a3f6c0 (LWP 1662662) exited] [Thread 0x7f6b612406c0 (LWP 1662661) exited] [Thread 0x7f6b61a416c0 (LWP 1662660) exited]

Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists. (gdb) quit

second run:

gdb -p 1662846 (gdb) break /usr/include/postgresql/17/server/lib/simplehash.h:627 Breakpoint 1 at 0x7f6b61b5f671: /usr/include/postgresql/17/server/lib/simplehash.h:627. (2 locations) (gdb) continue Continuing. [New Thread 0x7f6b61a416c0 (LWP 1663211)] [New Thread 0x7f6b612406c0 (LWP 1663212)] [New Thread 0x7f6b60a3f6c0 (LWP 1663213)]

Thread 1 "postgres" hit Breakpoint 1.2, BaserelInfo_insert_hash_internal (tb=0x5ba2c016e800, key=key@entry=1417, hash=1680727317, hash@entry=1995299445, found=found@entry=0x7fff44af9b37) at /usr/include/postgresql/17/server/lib/simplehash.h:627 627 if (unlikely(tb->members >= tb->grow_threshold)) (gdb) bt #0 BaserelInfo_insert_hash_internal (tb=0x5ba2c016e800, key=key@entry=1417, hash=1680727317, hash@entry=1995299445, found=found@entry=0x7fff44af9b37) at /usr/include/postgresql/17/server/lib/simplehash.h:627 #1 0x00007f6b61c413e4 in BaserelInfo_insert (found=0x7fff44af9b37, key=, tb=) at /usr/include/postgresql/17/server/lib/simplehash.h:781 #2 get_or_add_baserel_from_cache (chunk_reloid=1417, parent_reloid=parent_reloid@entry=0) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:790 #3 0x00007f6b61c41560 in ts_classify_relation (root=root@entry=0x5ba2c0415798, rel=rel@entry=0x5ba2c0414470, ht=ht@entry=0x7fff44af9bb8) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:891 #4 0x00007f6b61c46664 in timescaledb_get_relation_info_hook (relation_objectid=, rel=0x5ba2c0414470, inhparent=false, root=0x5ba2c0415798) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:1442 #5 timescaledb_get_relation_info_hook (root=0x5ba2c0415798, relation_objectid=, inhparent=, rel=0x5ba2c0414470) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:1430 #6 0x00005ba2bf02d2c8 in build_simple_rel () #7 0x00005ba2beff65d1 in add_base_rels_to_query () #8 0x00005ba2beff662e in add_base_rels_to_query () #9 0x00005ba2beffaa73 in query_planner () #10 0x00005ba2beffce1a in ?? () #11 0x00005ba2bf000373 in subquery_planner () #12 0x00005ba2bf0006c8 in standard_planner () #13 0x00007f6da0d4ad2d in ?? () from /usr/lib/postgresql/17/lib/pg_stat_statements.so #14 0x00007f6d9e884349 in DuckdbPlannerHook_Cpp (bound_params=0x0, cursor_options=2048, query_string=0x7f6d9e895e40 "\n\t\tSELECT\n\t\t\tfs.oid as server_oid\n\t\tFROM pg_foreign_server fs\n\t\tINNER JOIN pg_foreign_data_wrapper fdw ON fdw.oid = fs.srvfdw\n\t\tWHERE fdw.fdwname = 'duckdb' AND fs.srvtype != 'motherduck';\n\t", parse=0x5ba2c0142308) at src/pgduckdb_hooks.cpp:289 #15 pgduckdb::CPPFunctionGuard<PlannedStmt* ()(Query, char const*, int, ParamListInfoData*), &(DuckdbPlannerHook_Cpp(Query*, char const*, int, ParamListInfoData*)), Query*, char const*, int, ParamListInfoData*>(char const*, char const*, int, Query*&, char const*&, int&, ParamListInfoData*&) [clone .constprop.0] [clone .isra.0] (line=, file_name=, func_name=) at src/pgduckdb_hooks.cpp:294 #16 0x00007f6b61c437bd in timescaledb_planner (parse=0x5ba2c0142308, query_string=0x7f6d9e895e40 "\n\t\tSELECT\n\t\t\tfs.oid as server_oid\n\t\tFROM pg_foreign_server fs\n\t\tINNER JOIN pg_foreign_data_wrapper fdw ON fdw.oid = fs.srvfdw\n\t\tWHERE fdw.fdwname = 'duckdb' AND fs.srvtype != 'motherduck';\n\t", cursor_opts=, bound_params=0x0) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:676 #17 0x00005ba2bf0e63cb in pg_plan_query () #18 0x00005ba2bf0e64c2 in pg_plan_queries () #19 0x00005ba2bf2501e3 in ?? () #20 0x00005ba2bf250637 in GetCachedPlan () #21 0x00005ba2bef4588c in ?? () #22 0x00005ba2bef363d5 in SPI_execute () #23 0x00007f6d9e87dfbb in pgduckdb::pg::ListDuckDBCreateSecretQueries () at src/pgduckdb_secrets_helper.cpp:95 #24 pgduckdb::CPPFunctionGuard<List* ()(), &pgduckdb::pg::ListDuckDBCreateSecretQueries> (func_name=0x7f6d9e895f78 "pg::ListDuckDBCreateSecretQueries", file_name=0x7f6d9e88f515 "src/pgduckdb_duckdb.cpp", line=233) at src/pgduckdb_duckdb.cpp:233 #25 pgduckdb::DuckDBManager::LoadSecrets (this=, context=...) at src/pgduckdb_duckdb.cpp:233 #26 pgduckdb::DuckDBManager::RefreshConnectionState(duckdb::ClientContext&) [clone .constprop.0] (context=..., this=) at src/pgduckdb_duckdb.cpp:324 #27 0x00007f6d9e845ebb in pgduckdb::DuckDBManager::GetConnection (force_transaction=false) at src/pgduckdb_duckdb.cpp:374 #28 0x00007f6d9e84a554 in DuckdbPrepare (query=, explain_prefix=0x0) at src/pgduckdb_planner.cpp:44 #29 0x00007f6d9e87e80d in CreatePlan (throw_error=false, query=0x5ba2c0010f38) at src/pgduckdb_planner.cpp:55 #30 pgduckdb::CPPFunctionGuard<Plan ()(Query, bool), &(CreatePlan(Query*, bool)), Query*, bool>(char const*, char const*, int, Query*&, bool&) [clone .constprop.0] [clone .isra.0] (line=, file_name=, func_name=) at src/pgduckdb_planner.cpp:140 #31 0x00007f6d9e849fd2 in DuckdbPlanNode (parse=0x5ba2c0010f38, cursor_options=2048, throw_error=) at src/pgduckdb_planner.cpp:140 #32 0x00007f6d9e8843c2 in DuckdbPlannerHook_Cpp (bound_params=0x0, cursor_options=2048, query_string=0x5ba2c00100e8 "select count() from ms_ap_history_atomic_2;", parse=0x5ba2c0010f38) at src/pgduckdb_hooks.cpp:268 #33 pgduckdb::CPPFunctionGuard<PlannedStmt ()(Query, char const*, int, ParamListInfoData*), &(DuckdbPlannerHook_Cpp(Query*, char const*, int, ParamListInfoData*)), Query*, char const*, int, ParamListInfoData*>(char const*, char const*, int, Query*&, char const*&, int&, ParamListInfoData*&) [clone .constprop.0] [clone .isra.0] (line=, file_name=, func_name=) at src/pgduckdb_hooks.cpp:294 #34 0x00007f6b61c437bd in timescaledb_planner (parse=0x5ba2c0010f38, query_string=0x5ba2c00100e8 "select count(*) from ms_ap_history_atomic_2;", cursor_opts=, bound_params=0x0) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:676 #35 0x00005ba2bf0e63cb in pg_plan_query () #36 0x00005ba2bf0e64c2 in pg_plan_queries () #37 0x00005ba2bf0e7a8a in ?? () #38 0x00005ba2bf0f0124 in PostgresMain () #39 0x00005ba2bf0e5d1f in BackendMain () #40 0x00005ba2bf045f46 in ?? () #41 0x00005ba2bf2dfc61 in ?? () #42 0x00005ba2bf051535 in PostmasterMain () #43 0x00005ba2becf603d in main () (gdb) continue Continuing.

Thread 1 "postgres" hit Breakpoint 1.2, BaserelInfo_insert_hash_internal (tb=0x5ba2c016e800, key=key@entry=2328, hash=1582133820, hash@entry=3175868052, found=found@entry=0x7fff44af9b67) at /usr/include/postgresql/17/server/lib/simplehash.h:627 627 if (unlikely(tb->members >= tb->grow_threshold)) (gdb) bt #0 BaserelInfo_insert_hash_internal (tb=0x5ba2c016e800, key=key@entry=2328, hash=1582133820, hash@entry=3175868052, found=found@entry=0x7fff44af9b67) at /usr/include/postgresql/17/server/lib/simplehash.h:627 #1 0x00007f6b61c413e4 in BaserelInfo_insert (found=0x7fff44af9b67, key=, tb=) at /usr/include/postgresql/17/server/lib/simplehash.h:781 #2 get_or_add_baserel_from_cache (chunk_reloid=2328, parent_reloid=parent_reloid@entry=0) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:790 #3 0x00007f6b61c41560 in ts_classify_relation (root=root@entry=0x5ba2c0415798, rel=rel@entry=0x5ba2c0416cd8, ht=ht@entry=0x7fff44af9be8) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:891 #4 0x00007f6b61c46664 in timescaledb_get_relation_info_hook (relation_objectid=, rel=0x5ba2c0416cd8, inhparent=false, root=0x5ba2c0415798) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:1442 #5 timescaledb_get_relation_info_hook (root=0x5ba2c0415798, relation_objectid=, inhparent=, rel=0x5ba2c0416cd8) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:1430 #6 0x00005ba2bf02d2c8 in build_simple_rel () #7 0x00005ba2beff662e in add_base_rels_to_query () #8 0x00005ba2beffaa73 in query_planner () #9 0x00005ba2beffce1a in ?? () #10 0x00005ba2bf000373 in subquery_planner () #11 0x00005ba2bf0006c8 in standard_planner () #12 0x00007f6da0d4ad2d in ?? () from /usr/lib/postgresql/17/lib/pg_stat_statements.so #13 0x00007f6d9e884349 in DuckdbPlannerHook_Cpp (bound_params=0x0, cursor_options=2048, query_string=0x7f6d9e895e40 "\n\t\tSELECT\n\t\t\tfs.oid as server_oid\n\t\tFROM pg_foreign_server fs\n\t\tINNER JOIN pg_foreign_data_wrapper fdw ON fdw.oid = fs.srvfdw\n\t\tWHERE fdw.fdwname = 'duckdb' AND fs.srvtype != 'motherduck';\n\t", parse=0x5ba2c0142308) at src/pgduckdb_hooks.cpp:289 #14 pgduckdb::CPPFunctionGuard<PlannedStmt* ()(Query, char const*, int, ParamListInfoData*), &(DuckdbPlannerHook_Cpp(Query*, char const*, int, ParamListInfoData*)), Query*, char const*, int, ParamListInfoData*>(char const*, char const*, int, Query*&, char const*&, int&, ParamListInfoData*&) [clone .constprop.0] [clone .isra.0] (line=, file_name=, func_name=) at src/pgduckdb_hooks.cpp:294 #15 0x00007f6b61c437bd in timescaledb_planner (parse=0x5ba2c0142308, query_string=0x7f6d9e895e40 "\n\t\tSELECT\n\t\t\tfs.oid as server_oid\n\t\tFROM pg_foreign_server fs\n\t\tINNER JOIN pg_foreign_data_wrapper fdw ON fdw.oid = fs.srvfdw\n\t\tWHERE fdw.fdwname = 'duckdb' AND fs.srvtype != 'motherduck';\n\t", cursor_opts=, bound_params=0x0) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:676 #16 0x00005ba2bf0e63cb in pg_plan_query () #17 0x00005ba2bf0e64c2 in pg_plan_queries () #18 0x00005ba2bf2501e3 in ?? () #19 0x00005ba2bf250637 in GetCachedPlan () #20 0x00005ba2bef4588c in ?? () #21 0x00005ba2bef363d5 in SPI_execute () #22 0x00007f6d9e87dfbb in pgduckdb::pg::ListDuckDBCreateSecretQueries () at src/pgduckdb_secrets_helper.cpp:95 #23 pgduckdb::CPPFunctionGuard<List* ()(), &pgduckdb::pg::ListDuckDBCreateSecretQueries> (func_name=0x7f6d9e895f78 "pg::ListDuckDBCreateSecretQueries", file_name=0x7f6d9e88f515 "src/pgduckdb_duckdb.cpp", line=233) at src/pgduckdb_duckdb.cpp:233 #24 pgduckdb::DuckDBManager::LoadSecrets (this=, context=...) at src/pgduckdb_duckdb.cpp:233 #25 pgduckdb::DuckDBManager::RefreshConnectionState(duckdb::ClientContext&) [clone .constprop.0] (context=..., this=) at src/pgduckdb_duckdb.cpp:324 #26 0x00007f6d9e845ebb in pgduckdb::DuckDBManager::GetConnection (force_transaction=false) at src/pgduckdb_duckdb.cpp:374 #27 0x00007f6d9e84a554 in DuckdbPrepare (query=, explain_prefix=0x0) at src/pgduckdb_planner.cpp:44 #28 0x00007f6d9e87e80d in CreatePlan (throw_error=false, query=0x5ba2c0010f38) at src/pgduckdb_planner.cpp:55 #29 pgduckdb::CPPFunctionGuard<Plan ()(Query, bool), &(CreatePlan(Query*, bool)), Query*, bool>(char const*, char const*, int, Query*&, bool&) [clone .constprop.0] [clone .isra.0] (line=, file_name=, func_name=) at src/pgduckdb_planner.cpp:140 #30 0x00007f6d9e849fd2 in DuckdbPlanNode (parse=0x5ba2c0010f38, cursor_options=2048, throw_error=) at src/pgduckdb_planner.cpp:140 #31 0x00007f6d9e8843c2 in DuckdbPlannerHook_Cpp (bound_params=0x0, cursor_options=2048, query_string=0x5ba2c00100e8 "select count() from ms_ap_history_atomic_2;", parse=0x5ba2c0010f38) at src/pgduckdb_hooks.cpp:268 #32 pgduckdb::CPPFunctionGuard<PlannedStmt ()(Query, char const*, int, ParamListInfoData*), &(DuckdbPlannerHook_Cpp(Query*, char const*, int, ParamListInfoData*)), Query*, char const*, int, ParamListInfoData*>(char const*, char const*, int, Query*&, char const*&, int&, ParamListInfoData*&) [clone .constprop.0] [clone .isra.0] (line=, file_name=, func_name=) at src/pgduckdb_hooks.cpp:294 #33 0x00007f6b61c437bd in timescaledb_planner (parse=0x5ba2c0010f38, query_string=0x5ba2c00100e8 "select count(*) from ms_ap_history_atomic_2;", cursor_opts=, bound_params=0x0) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:676 #34 0x00005ba2bf0e63cb in pg_plan_query () #35 0x00005ba2bf0e64c2 in pg_plan_queries () #36 0x00005ba2bf0e7a8a in ?? () #37 0x00005ba2bf0f0124 in PostgresMain () #38 0x00005ba2bf0e5d1f in BackendMain () #39 0x00005ba2bf045f46 in ?? () #40 0x00005ba2bf2dfc61 in ?? () #41 0x00005ba2bf051535 in PostmasterMain () #42 0x00005ba2becf603d in main () (gdb) continue Continuing.

Thread 1 "postgres" hit Breakpoint 1.2, BaserelInfo_insert_hash_internal (tb=0x5ba2c016e800, key=key@entry=1417, hash=1680727317, hash@entry=1995299445, found=found@entry=0x7fff44af9a87) at /usr/include/postgresql/17/server/lib/simplehash.h:627 627 if (unlikely(tb->members >= tb->grow_threshold)) (gdb) continue Continuing.

Thread 1 "postgres" hit Breakpoint 1.2, BaserelInfo_insert_hash_internal (tb=0x5ba2c016e800, key=key@entry=2328, hash=1582133820, hash@entry=3175868052, found=found@entry=0x7fff44af9a87) at /usr/include/postgresql/17/server/lib/simplehash.h:627 627 if (unlikely(tb->members >= tb->grow_threshold)) (gdb) s 642 startelem = SH_INITIAL_BUCKET(tb, hash); (gdb) s BaserelInfo_initial_bucket (hash=, tb=) at /usr/include/postgresql/17/server/lib/simplehash.h:359 359 return hash & tb->sizemask; (gdb) s BaserelInfo_insert_hash_internal (tb=0x5ba2c016e800, key=key@entry=2328, hash=1582133820, hash@entry=3175868052, found=found@entry=0x7fff44af9a87) at /usr/include/postgresql/17/server/lib/simplehash.h:641 641 data = tb->data; (gdb) s 642 startelem = SH_INITIAL_BUCKET(tb, hash); (gdb) s BaserelInfo_initial_bucket (hash=1582133820, tb=0x5ba2c016e800) at /usr/include/postgresql/17/server/lib/simplehash.h:359 359 return hash & tb->sizemask; (gdb) s BaserelInfo_insert_hash_internal (tb=0x5ba2c016e800, key=key@entry=2328, hash=1582133820, hash@entry=3175868052, found=found@entry=0x7fff44af9a87) at /usr/include/postgresql/17/server/lib/simplehash.h:649 649 SH_ELEMENT_TYPE *entry = &data[curelem]; (gdb) s 652 if (entry->status == SH_STATUS_EMPTY) (gdb) s 617 insertdist = 0; (gdb) s 672 if (SH_COMPARE_KEYS(tb, hash, key, entry)) (gdb) s 660 *found = false; (gdb) s 770 } (gdb) s Downloading source file /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c get_or_add_baserel_from_cache (chunk_reloid=2328, parent_reloid=parent_reloid@entry=0) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:790
warning: 790 /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c: No such file or directory (gdb) s 0x00007f6b61c413e8 in BaserelInfo_insert (found=0x7fff44af9a87, key=, tb=) at /usr/include/postgresql/17/server/lib/simplehash.h:781 781 return SH_INSERT_HASH_INTERNAL(tb, key, hash, found); (gdb) s get_or_add_baserel_from_cache (chunk_reloid=2328, parent_reloid=parent_reloid@entry=0) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:791 warning: 791 /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c: No such file or directory (gdb) s 834 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c (gdb) s ts_classify_relation (root=root@entry=0x5ba2c0415798, rel=rel@entry=0x5ba2c0416cd8, ht=ht@entry=0x7fff44af9b98) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:892 892 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c (gdb) s 894 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c (gdb) s timescaledb_set_rel_pathlist (root=0x5ba2c0415798, rel=0x5ba2c0416cd8, rti=2, rte=0x5ba2c0142b40) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:1361 1361 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c (gdb) s ts_rte_is_marked_for_expansion (rte=rte@entry=0x5ba2c0142b40) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:190 190 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c (gdb) s 191 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c (gdb) s timescaledb_set_rel_pathlist (root=0x5ba2c0415798, rel=0x5ba2c0416cd8, rti=, rte=0x5ba2c0142b40) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c:1364 1364 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c (gdb) s 1365 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/planner.c (gdb) s Downloading source file /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c ts_planner_constraint_cleanup.isra.0 (rel=0x5ba2c0416cd8, root=) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c:87
warning: 87 /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c: No such file or directory (gdb) s 83 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c (gdb) s 86 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c (gdb) s 87 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c (gdb) s 0x00007f6b61c3f7e8 in restrictinfo_cleanup.part.0.lto_priv.0 (restrictinfos=0x5ba2c0417740, pfiltered=0x7fff44af9ac7) at /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c:44 warning: 44 /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c: No such file or directory (gdb) s 46 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c (gdb) s 47 in /usr/src/timescaledb-2-postgresql-17-2.24.0~ubuntu24.04-1707/src/planner/constraint_cleanup.c (gdb) continue Continuing.

Thread 1 "postgres" hit Breakpoint 1.2, BaserelInfo_insert_hash_internal (tb=0x0, key=key@entry=31621235, hash=636350238, hash@entry=3020186918, found=found@entry=0x7fff44af9e27) at /usr/include/postgresql/17/server/lib/simplehash.h:627 627 if (unlikely(tb->members >= tb->grow_threshold)) (gdb) s

Thread 1 "postgres" received signal SIGSEGV, Segmentation fault. BaserelInfo_insert_hash_internal (tb=0x0, key=key@entry=31621235, hash=636350238, hash@entry=3020186918, found=found@entry=0x7fff44af9e27) at /usr/include/postgresql/17/server/lib/simplehash.h:627 627 if (unlikely(tb->members >= tb->grow_threshold)) (gdb) s Couldn't get registers: No such process. (gdb) [Thread 0x7f6b60a3f6c0 (LWP 1663213) exited] [Thread 0x7f6b612406c0 (LWP 1663212) exited] [Thread 0x7f6da1611a80 (LWP 1662846) exited] [Thread 0x7f6b61a416c0 (LWP 1663211) exited] [New process 1662846]

Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists.

The program is not being run. (gdb)

rusha1333 avatar Dec 04 '25 09:12 rusha1333