Re: Assistance with an out of shared memory error

2022-01-15 Thread Tom Lane
Mladen Gogala writes: > On 1/13/22 18:35, Tom Lane wrote: >> .. or else reduce the number of partitions you're using. (People >> frequently seem to think that more partitions are free. That is >> extremely not true. I generally think that if you're using more >> than a few dozen partitions per

Re: Assistance with an out of shared memory error

2022-01-15 Thread Mladen Gogala
On 1/13/22 18:35, Tom Lane wrote: .. or else reduce the number of partitions you're using. (People frequently seem to think that more partitions are free. That is extremely not true. I generally think that if you're using more than a few dozen partitions per table, you are making a mistake.)

Re: Assistance with an out of shared memory error

2022-01-14 Thread Gautam Bellary
Hi Tom, This was very helpful, thanks for the tips. Gautam On Thu, Jan 13, 2022 at 3:36 PM Tom Lane wrote: > Gautam Bellary writes: > > I've got a PL/pgSQL function (regenerate_gateway_last_seen, attached) > that > > loops through all partitions of 2 tables ("Measure" and > "ValuelessMeasure"

Re: Assistance with an out of shared memory error

2022-01-13 Thread Tom Lane
Gautam Bellary writes: > I've got a PL/pgSQL function (regenerate_gateway_last_seen, attached) that > loops through all partitions of 2 tables ("Measure" and "ValuelessMeasure", > schema attached) selecting data from each into another table > ("GatewayLastSeenNew"). Occasionally the function runs

Assistance with an out of shared memory error

2022-01-13 Thread Gautam Bellary
Hi Postgres group, I'm reaching out for some help with an "ERROR: out of shared memory. HINT: You might need to increase max_locks_per_transaction" issue: I've got a PL/pgSQL function (regenerate_gateway_last_seen, attached) that loops through all partitions of 2 tables ("Measure" and "ValuelessM

Re: Shared memory error

2020-06-04 Thread Thomas Munro
On Fri, Jun 5, 2020 at 1:00 AM Sonam Sharma wrote: > The dynamic_shared_memory_type was set to POSIX . Because of this it was > using tmpfs /dev/shm. When the query was running I saw the file system was > filling. So I extended the file system and luckily the query worked for that > time Oh,

Re: Shared memory error

2020-06-04 Thread Sonam Sharma
The dynamic_shared_memory_type was set to POSIX . Because of this it was using tmpfs /dev/shm. When the query was running I saw the file system was filling. So I extended the file system and luckily the query worked for that time On Thu, Jun 4, 2020, 5:12 PM Thomas Munro wrote: > >> Do you see

Re: Shared memory error

2020-06-04 Thread Thomas Munro
>> Do you see any other errors around this one, in the PostgreSQL logs? > No , only this is the error from db and jdbc end .. and queries are failing If you need a workaround right now you could always set max_parallel_workers_per_gather=0 so that it doesn't try to use parallel query. That could

Re: Shared memory error

2020-06-04 Thread Thomas Munro
On Thu, Jun 4, 2020 at 6:18 AM Sonam Sharma wrote: >>> 1) Postgres version : 11.2 FYI This is missing over a year's worth of bugfixes. That said, I don't know of anything fixed that has this symptom. >>> 4) Is this only with one query and if so what is it doing? : No , few >>> queries work, fe

Re: Shared memory error

2020-06-04 Thread Naresh g
Hi, If the dynamic shared memory segment type is POSIX then *dynamic shared memory control segment in your case it is **PostgreSQL.1511679208* is stored in */dev/shm* The file you mentioned will be created at the time of PostgreSQL startup and cleared automatically on successful shutdown. Compl

Re: Shared memory error

2020-06-04 Thread Sonam Sharma
Can someone please help on this On Wed, Jun 3, 2020, 11:27 PM Sonam Sharma wrote: > I have set the dynamic_shared_memory_type to none which was set as POSIX. > For now we are not seeing the error... Can someone please explain what is > the impact of setting it as none . > > On Wed, Jun 3, 2020,

Re: Shared memory error

2020-06-03 Thread Sonam Sharma
Updated jdbc version also On Wed, Jun 3, 2020, 11:46 PM Sonam Sharma wrote: > > > On Wed, Jun 3, 2020, 11:29 PM Adrian Klaver > wrote: > >> On 6/3/20 7:58 AM, Sonam Sharma wrote: >> > Hi Team, >> > >> > Getting below error when any query is running from jdbc side : >> > >> > Error : could not o

Re: Shared memory error

2020-06-03 Thread Sonam Sharma
On Wed, Jun 3, 2020, 11:29 PM Adrian Klaver wrote: > On 6/3/20 7:58 AM, Sonam Sharma wrote: > > Hi Team, > > > > Getting below error when any query is running from jdbc side : > > > > Error : could not open memory segment "/PostgreSQL.1511679208" : No such > > file or directory > > > > Yesterday

Re: Shared memory error

2020-06-03 Thread Adrian Klaver
On 6/3/20 7:58 AM, Sonam Sharma wrote: Hi Team, Getting below error when any query is running from jdbc side : Error : could not open memory segment "/PostgreSQL.1511679208" : No such file or directory Yesterday I have extended the /dev/shm filesystem and the query ran. But today again the

Re: Shared memory error

2020-06-03 Thread Sonam Sharma
I have set the dynamic_shared_memory_type to none which was set as POSIX. For now we are not seeing the error... Can someone please explain what is the impact of setting it as none . On Wed, Jun 3, 2020, 8:28 PM Sonam Sharma wrote: > Hi Team, > > Getting below error when any query is running fro

Shared memory error

2020-06-03 Thread Sonam Sharma
Hi Team, Getting below error when any query is running from jdbc side : Error : could not open memory segment "/PostgreSQL.1511679208" : No such file or directory Yesterday I have extended the /dev/shm filesystem and the query ran. But today again the issue is repeating. Can someone please help