Обсуждение: ERROR: could not attach to dynamic shared area

Поиск
Список
Период
Сортировка

ERROR: could not attach to dynamic shared area

От
Andrew Longwill
Дата:

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

Re: ERROR: could not attach to dynamic shared area

От
Michael Paquier
Дата:
On Wed, Jun 26, 2024 at 02:43:30PM +0000, Andrew Longwill wrote:
> 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.

I suspect that you have been hit with this issue:
https://www.postgresql.org/message-id/CAO6_XqqJbJBL=M7Ym13TcB4Xnq58vRa2jcC+gwEPBgbAda6B1Q@mail.gmail.com

A fix has been committed for it today by me down to v15.  This will
show up in the next round of minor releases.
--
Michael

Вложения