Hi,

We have developed a PostgreSQL extension and are currently encountering 
intermittent crashes related to shared memory on PostgreSQL 17.7. The issue 
does not occur everytime, and we have not been able to reliably reproduce it in 
our local environment. We have attached the relevant pg logs and backtraces 
below for reference.

We also noticed a recent commit addressing a DSM-related issue:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=1d0fc2499 

Could you please confirm whether this change can resolve the type of crash we 
are encountering?



Thanks & Regards,

Reshmithaa B




Member Technical Staff

ZOHO Corporation
[2136038]:ERROR:  XX000: dsa_area could not attach to a segment that has been 
freed
[2136038]:LOCATION:  get_segment_by_index, dsa.c:1781
[2136037]:ERROR:  XX000: dsa_area could not attach to a segment that has been 
freed
[2136037]:LOCATION:  get_segment_by_index, dsa.c:1781
[2018946]:ERROR:  XX000: dsa_area could not attach to a segment that has been 
freed
[2018946]:CONTEXT:  parallel worker
[2018946]:LOCATION:  get_segment_by_index, dsa.c:1781
[2018946]:STATEMENT:  select sum(enumrowcount)::bigint from <table> where dbid 
= <dbid> and table_id != <table_id>
[875575]:LOG:  00000: background worker "parallel worker" (PID 2136037) exited 
with exit code 1
[875575]:LOCATION:  LogChildExit, postmaster.c:3086
[875575]:LOG:  00000: background worker "parallel worker" (PID 2136038) exited 
with exit code 1
[875575]:LOCATION:  LogChildExit, postmaster.c:3086
[2061697]:LOG:  00000: Running single-threaded autovacuum for table <table_id> 
in database <dbid>
[2061697]:LOCATION:  operator(), cstore_vacuum.cpp:267
[875575]:LOG:  00000: server process (PID 2037344) was terminated by signal 11: 
Segmentation fault
[875575]:DETAIL:  Failed process was running: INSERT INTO <tab>...
[568111]:ERROR:  53200: out of memory
[568111]:DETAIL:  Failed on DSA request of size 48.
[568111]:LOCATION:  dsa_allocate_extended, dsa.c:811
[568111]:STATEMENT:   TRUNCATE TABLE tab3
[495070]:LOG:  00000: Running single-threaded autovacuum for table 269613858 in 
database 17266
[495070]:LOCATION:  operator(), cstore_vacuum.cpp:267
[568804]:ERROR:  53200: out of memory
[568804]:DETAIL:  Failed while allocating entry 2/17266/55068384.
[568804]:LOCATION:  pgstat_get_entry_ref, pgstat_shmem.c:510
[568804]:STATEMENT:   ANALYZE tab2_temp
[568920]:ERROR:  53200: out of memory
[568920]:DETAIL:  Failed on DSA request of size 48.
[568920]:LOCATION:  dsa_allocate_extended, dsa.c:811
[568920]:STATEMENT:   ANALYZE tab1
[568804]:ERROR:  25P02: current transaction is aborted, commands ignored until 
end of transaction block
[568804]:LOCATION:  exec_parse_message, postgres.c:1506
[568804]:STATEMENT:  delete from tab2  where __ZDBID
        in (select __ROWID  from  tab2_temp)
[568920]:ERROR:  25P02: current transaction is aborted, commands ignored until 
end of transaction block
[568920]:LOCATION:  exec_parse_message, postgres.c:1506
[568920]:STATEMENT:  delete from tab4  where __ZDBID
        in (select __ROWID  from  tab1)
[568111]:ERROR:  53200: out of memory
[568111]:DETAIL:  Failed on DSA request of size 48.
[568111]:LOCATION:  dsa_allocate_extended, dsa.c:811
[568111]:STATEMENT:   select TABLE_ID from Table  where TABLE_ID=<id>
[875575]:LOG:  00000: server process (PID 568804) was terminated by signal 11: 
Segmentation fault
[875575]:DETAIL:  Failed process was running: ROLLBACK
[875575]:LOCATION:  LogChildExit, postmaster.c:3108
[875575]:LOG:  00000: terminating any other active server processes
[875575]:LOCATION:  HandleChildCrash, postmaster.c:2897

Reply via email to