RE: Memory issues with PostgreSQL 15

From: Christian Schröder <christian(dot)schroeder(at)wsd(dot)com>
To: Francisco Olarte <folarte(at)peoplecall(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, Eric Wong <eric(dot)wong(at)wsd(dot)com>
Subject: RE: Memory issues with PostgreSQL 15
Date: 2024-05-28 22:59:13
Message-ID: LO0P265MB2700F3C159F47D8F039D6B1FF9F12@LO0P265MB2700.GBRP265.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Francisco,
Thank you for your advice. I used "ipcs" to get more readable information about the shared memory:

# ipcs -m -l --human

------ Shared Memory Limits --------
max number of segments = 4096
max seg size = 16E
max total shared memory = 16E
min seg size = 1B

# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x04000194 35 postgres 600 56 19

# ipcs -m -i 35

Shared memory Segment shmid=35
uid=26 gid=26 cuid=26 cgid=26
mode=0600 access_perms=0600
bytes=56 lpid=7653 cpid=3875 nattch=19
att_time=Tue May 28 22:56:35 2024
det_time=Tue May 28 22:56:35 2024
change_time=Tue May 28 07:59:59 2024

As far as I understand, there is no upper limit to the size of the shared memory. The database only holds a single shared memory segment, which doesn't seem to have a relevant size.
I am surprised to see this since I would have expected much more shared memory to be used by the database. Is there anything in the configuration that prevents the shared memory from being used?

Best,
Christian

-----Original Message-----
From: Francisco Olarte <folarte(at)peoplecall(dot)com>
Sent: Tuesday, May 28, 2024 7:15 PM
To: Christian Schröder <christian(dot)schroeder(at)wsd(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org; Eric Wong <eric(dot)wong(at)wsd(dot)com>
Subject: Re: Memory issues with PostgreSQL 15

[EXTERNAL]

Hi Christian:

On Tue, 28 May 2024 at 18:40, Christian Schröder <christian(dot)schroeder(at)wsd(dot)com> wrote:

> <2024-05-21 11:34:46 CEST - mailprocessor> ERROR: could not resize
> shared memory segment "/PostgreSQL.2448337832" to 182656 bytes: No
> space left on device

This hints at some shm function getting an ENOSPC: Coupled with...

> I thought this could all be related to our "shared_buffers" setting, so I increased it to 8 GB. This almost immediately (after a few minutes) gave me these errors:

A faster fail when increasing it I would start by checking your IPC shared memory limits are ok, especially if you upgraded something in the OS when going from 9 to 15, which seems likely.

IIRC in linux you can read them in /proc/sys/kernel/shm*, and they were configured via sysctl.

Francisco Olarte.

----------------------------------------------
SUPPORT:
For any issues, inquiries, or assistance, please contact our support team at support(at)wsd(dot)com(dot) Our dedicated team is available to help you and provide prompt assistance.

CONFIDENTIALITY NOTICE:
This email and any attachments are confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this email in error, please notify the sender immediately and delete it from your system.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Lawrence Barwick 2024-05-29 00:27:30 Re: tds_fdw >> Install Foreign data Wrapper on EDB Postgres to connect to SQL server database
Previous Message Sumit Kochar 2024-05-28 21:10:05 tds_fdw >> Install Foreign data Wrapper on EDB Postgres to connect to SQL server database