Обсуждение: Postgresql15 crash with :FATAL: could not open shared memory segment "/PostgreSQL.0000000": No such file or directory

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


Hi,

Can you please look into this:

Postgres version 15 randomly crash with the following error : FATAL: could not open shared memory segment "/PostgreSQL.2771626404": No such file or directory

 

After testing I found out that when shared memory is removed on:

 

1-PostgreSQL 12, 13,14:  no impact, the server perform as normal.

2-PostgreSQL 15: postgresql server crash and no user is able to login to the DB. Any attempt to login you will get the above error.

 

Regards,

Emile

 

 



Absa Bank Limited is a subsidiary of Absa Group Limited and is an Authorised Financial Services Provider and Registered Credit Provider, registration number: NCRCP7.

Absa Bank Limited provides services to Absa Group Limited and its subsidiaries.

Absa is committed to complying with applicable data privacy laws and to safeguarding the privacy and security of the personal information it collects and processes, in respect of all current and prospective clients. To understand more about how we collect, store, and process your personal information, please view our privacy statement at absa.co.za

This e-mail and any attachments are confidential and intended solely for the addressee and may also be privileged or exempt from disclosure under applicable law. If you are not the addressee, or have received this e-mail in error, please notify the sender immediately, delete it from your system and do not copy, disclose or otherwise act upon any part of this e-mail or its attachments. Internet communications are not guaranteed to be secure or virus-free. We do not accept responsibility for any loss arising from unauthorised access to, or interference with, any Internet communications by any third party, or from the transmission of any viruses. We may monitor replies to this e-mail for operational or business reasons. Any opinion or other information in this e-mail or its attachments that does not relate to our business is personal to the sender and we do not endorse it.
On Thu, Aug 17, 2023, at 5:27 PM, Emile Amewoto (ZA) wrote:

Postgres version 15 randomly crash with the following error : FATAL: could not open shared memory segment "/PostgreSQL.2771626404": No such file or directory



You didn't provide enough information about your environment (operating system,
exact Postgres version, Postgres settings, etc).

I don't know if it is your exact problem but systemd contains a setting that
removes IPC during the logout. It means that if you are using the Postgres
service account (generally the 'postgres' user) to execute administrative tasks
and you log out while you're running a query (that requires dynamic shared
memory) then you get this error.

See 'man 5 logind.conf' for details. If you want to avoid it, disable RemoveIPC
in /etc/systemd/logind.conf. (IIRC only Debian/Ubuntu defaults to yes; RHEL
doesn't.)

If that's not your problem then you have to provide additional information as I
said before.


--
Euler Taveira

Thanks Euler, that's exactly my problem. 
I will set RemoveIPC to no.
Your update is very helpful, thanks again. 

My environment is Rhel 7.9

Regards, 
Émile 


On Mon, Aug 21, 2023 at 17:24, Euler Taveira
<euler@eulerto.com> wrote:
On Thu, Aug 17, 2023, at 5:27 PM, Emile Amewoto (ZA) wrote:

Postgres version 15 randomly crash with the following error : FATAL: could not open shared memory segment "/PostgreSQL.2771626404": No such file or directory



You didn't provide enough information about your environment (operating system,
exact Postgres version, Postgres settings, etc).

I don't know if it is your exact problem but systemd contains a setting that
removes IPC during the logout. It means that if you are using the Postgres
service account (generally the 'postgres' user) to execute administrative tasks
and you log out while you're running a query (that requires dynamic shared
memory) then you get this error.

See 'man 5 logind.conf' for details. If you want to avoid it, disable RemoveIPC
in /etc/systemd/logind.conf. (IIRC only Debian/Ubuntu defaults to yes; RHEL
doesn't.)

If that's not your problem then you have to provide additional information as I
said before.


--
Euler Taveira

On Mon, Aug 21, 2023 at 04:20:39PM +0000, Emile Amewoto wrote:
> Thanks Euler, that's exactly my problem. I will set RemoveIPC to
> no.Your update is very helpful, thanks again.

Note that there is a section about that in the docs, as well:
https://www.postgresql.org/docs/devel/kernel-resources.html#SYSTEMD-REMOVEIPC
--
Michael

Вложения