Hi all,

We’re using Postgresql 15.4 in AWS RDS. Since yesterday we have seen two 
occurrences where our PHP application becomes unable to connect to our RDS 
replicas. In the application logs we see the error "FATAL: could not attach to 
dynamic shared area". The RDS replica remains unusable in this state unless 
it’s rebooted.

In the Postgresql replica logs we see the following errors just before the 
above error occurs: (I’ve made the SELECT more succinct)

2024-06-25 21:04:36 UTC::@:[28757]:FATAL: terminating background worker 
"parallel worker" due to administrator command
2024-06-25 21:04:36 UTC::@:[28757]:STATEMENT: SELECT col1,..,col24 FROM 
my_table WHERE … DESC LIMIT 1
2024-06-25 21:04:36 UTC::@:[28758]:FATAL: terminating background worker 
"parallel worker" due to administrator command
2024-06-25 21:04:36 UTC::@:[28758]:STATEMENT: SELECT col1,..,col24 FROM 
my_table WHERE … DESC LIMIT 1
2024-06-25 21:04:36 UTC::@:[389]:LOG: background worker "parallel worker" (PID 
28757) exited with exit code 1
2024-06-25 21:04:36 UTC::@:[389]:LOG: background worker "parallel worker" (PID 
28758) exited with exit code 1

The same query is mentioned each time, however this is a query we’ve been 
running in production for many years. The query plan for that query is good.

AWS have advised that we try setting max_parallel_workers=0 and 
max_parallel_workers_per_gather=0.

Can anyone advise on why we might be seeing this error suddenly?

Many thanks

Andrew

Reply via email to