Thread: DSA refcnt overflow in pg_stat/could not attach to dynamic shared area

Our issue is very similar to this https://www.postgresql.org/message-id/ZnuprZeVZd2X_MOD%40paquier.xyz
Could you confirm which PostgreSQL 15.x minor version includes the fix for this issue? We rely on RPM packages and are unable to apply manual patches. Looking forward to your reply. Thank you!"

1. PostgreSQL 版本: 15.6
2. OS: RHEL8.10  
3. ERROR LOGS:
2025-04-24  03:41:32 55000: could not attach to dynamic shared area
2025-04-24 03:41:32client=LOCATION:  attach_internal, dsa.c:1334
2025-04-24 03:41:32client=LOG:  00000: background worker "parallel worker" (PID 3936459) exited with exit code 1
2025-04-24 03:41:32client=LOCATION:  LogChildExit, postmaster.c:3747
2025-04-24 03:41:32ERROR:  55000: parallel worker failed to initialize
2025-04-24 03:41:32HINT:  More details may be available in the server log.
2025-04-24 03:41:32  WaitForParallelWorkersToFinish, parallel.c:838
2025-04-24 03:41:32 STATEMENT:  select t.id,t.bar_code,t.request_id,t.host_ip,t.resv2,
         to_char(t.start_time,'yyyymmddhh24miss') as start_time,to_char(t.end_time,'yyyymmddhh24miss') as end_time,
        t.equipment_type,t.machine_id,t.control_machine_id,t.station,t.code_type,t.fixture_id,t.cavity,t.line,
        t.sw_name,t.sw_version,t.product_no,t.phase_no,t.bill_no,t.config,t.server_node,t.source,t.test_result,
        t.cost_time,t.process_rev,t.station_no,t.station_str,
        t.client_code,t.is_recheck,t.check_user,to_char(t.indate,'yyyymmddhh24miss.us') as indate,s.para_info,
        t.vendor_id,t.draw_name,t.draw_version,to_char(t.calibration_date,'yyyymmddhh24miss') as cali_date
        from aaaa   t left join bbbbbbb  s on s.id = t.id where t.indate > to_timestamp($1,'yyyymmddhh24miss.us')
        and t.indate< CLOCK_TIMESTAMP() - interval '5 minute' order by t.indate asc limit 3000
5. parameters:
   server total memory :512GB
   CPU:96 cores
   shared_buffers = 128GB
   max_connections = 3000
   worm_mem = 8M
   max_worker_processes = 400  
   max_parallel_workers_per_gather = 2
   max_parallel_maintenance_workers = 2
   max_parallel_workers = 64
   
On Thu, Apr 24, 2025 at 02:04:59PM +0800, 李园园 wrote:
> Our issue is very similar to this  https://www.postgresql.org/message-id/ZnuprZeVZd2X_MOD%40paquier.xyz
> Could you confirm which PostgreSQL 15.x minor version includes the
> fix for this issue? We rely on RPM packages and are unable to apply
> manual patches. Looking forward to your reply. Thank you!"
>
>
> 1. PostgreSQL 版本: 15.6
> 2. OS: RHEL8.10  
> 3. ERROR LOGS:
> 2025-04-24  03:41:32 55000: could not attach to dynamic shared area

Yes, that looks like the same issue.  15.6 has been released in
February 2024, and the fix on REL_15_STABLE is eb144dfcafdd, meaning
that it would be in at least 15.8.
--
Michael

Attachment