Re: Running docker in postgres, SHM size of the docker container in postgres 16

From: Koen De Groote <kdg(dot)dev(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Running docker in postgres, SHM size of the docker container in postgres 16
Date: 2024-11-20 11:06:07
Message-ID: CAGbX52HN8FRkmN6zfAnevFRLw058B59mAEJbghLXeXcK_HZd+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That explains a lot.

I have the default of 2 max_parallel_maintenance_workers set, should I set
this to 0?

I realize this is of course an improvement, but working with docker
containers, I'd like to avoid taking /dev/shm away from regular queries.

I assume setting max_parallel_maintenance_workers to 0 is the fix here, is
there perhaps something else I should know about, if I want to have control
over this?

Regards,
Koen De Groote

On Wed, Nov 20, 2024 at 12:38 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
wrote:

> On Wed, Nov 20, 2024 at 11:22 AM Koen De Groote <kdg(dot)dev(at)gmail(dot)com> wrote:
> > Why would that be? It's the exact same data. The install is about 50GB
> in size. Is there something wrong with postgres 16, or did some settings
> significantly change, that I need to know about? I went over all the
> changelogs, nothing stood out as relevant to this, but that might be a lack
> of experience on my end.
>
> Parallel vacuum arrived in PostgreSQL 13, and that uses "dynamic
> shared memory" to share state between workers, and assuming
> dynamic_shared_memory_type=posix, that means shm_open(), which opens
> files under /dev/shm on Linux.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Koen De Groote 2024-11-20 11:16:00 Memory settings when running postgres in a docker container
Previous Message Sreejith P 2024-11-20 10:50:55 Suddenly all queries moved to seq scan